From 330f5adf349aa4c7ed0744b1df310f3913b17e84 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 26 Aug 2024 15:09:01 -0500 Subject: [PATCH] Move `WORKDIR` directive in Docker examples (#6652) --- docs/guides/integration/docker.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guides/integration/docker.md b/docs/guides/integration/docker.md index 998a4cf974fd..b69c05282a62 100644 --- a/docs/guides/integration/docker.md +++ b/docs/guides/integration/docker.md @@ -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 ``` @@ -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