Skip to content

Commit

Permalink
Move WORKDIR directive in Docker examples (#6652)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Aug 26, 2024
1 parent a2290ff commit 330f5ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/guides/integration/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ If you're using uv to manage your project, you can copy it into the image and in
```dockerfile title="Dockerfile"
# Copy the project into the image
ADD . /app
WORKDIR /app

# Sync the project into a new environment, using the frozen lockfile
WORKDIR /app
RUN uv sync --frozen
```

Expand Down Expand Up @@ -228,12 +228,14 @@ a big time saver.
FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

# Change the working directory to the `app` directory
WORKDIR /app

# Copy the lockfile and `pyproject.toml` into the image
ADD uv.lock /app/uv.lock
ADD pyproject.toml /app/pyproject.toml

# Install dependencies
WORKDIR /app
RUN uv sync --frozen --no-install-project

# Copy the project into the image
Expand Down

0 comments on commit 330f5ad

Please sign in to comment.