Skip to content

Commit ab0fedc

Browse files
committed
Updated README.md with minor change around version choices
1 parent 96a0b83 commit ab0fedc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ This project seeks to:
5555
5656
**Using Python 3.14 (latest):**
5757
```dockerfile
58-
FROM ghcr.io/jski/python-container-builder:latest as build-venv
58+
FROM ghcr.io/jski/python-container-builder:latest AS build-venv
5959
COPY requirements.txt /requirements.txt
6060
RUN uv pip install -r /requirements.txt
6161

6262
FROM gcr.io/distroless/python3-debian12
63+
COPY --from=build-venv /usr/local /usr/local
6364
COPY --from=build-venv /.venv /.venv
6465
COPY /main.py /app/main.py
6566
WORKDIR /app
@@ -68,11 +69,12 @@ ENTRYPOINT ["/.venv/bin/python3", "-u", "main.py"]
6869

6970
**Using Python 3.12 (stable):**
7071
```dockerfile
71-
FROM ghcr.io/jski/python-container-builder:3.12 as build-venv
72+
FROM ghcr.io/jski/python-container-builder:3.12 AS build-venv
7273
COPY requirements.txt /requirements.txt
7374
RUN uv pip install -r /requirements.txt
7475

7576
FROM gcr.io/distroless/python3-debian12
77+
COPY --from=build-venv /usr/local /usr/local
7678
COPY --from=build-venv /.venv /.venv
7779
COPY /main.py /app/main.py
7880
WORKDIR /app
@@ -81,18 +83,19 @@ ENTRYPOINT ["/.venv/bin/python3", "-u", "main.py"]
8183

8284
**Using Python 3.10 (for older projects):**
8385
```dockerfile
84-
FROM ghcr.io/jski/python-container-builder:3.10 as build-venv
86+
FROM ghcr.io/jski/python-container-builder:3.10 AS build-venv
8587
COPY requirements.txt /requirements.txt
8688
RUN uv pip install -r /requirements.txt
8789

8890
FROM gcr.io/distroless/python3-debian11
91+
COPY --from=build-venv /usr/local /usr/local
8992
COPY --from=build-venv /.venv /.venv
9093
COPY /main.py /app/main.py
9194
WORKDIR /app
9295
ENTRYPOINT ["/.venv/bin/python3", "-u", "main.py"]
9396
```
9497

95-
> **Note**: When using Python 3.9 or 3.10, make sure to use `gcr.io/distroless/python3-debian11` as your runtime image. For Python 3.11 and above, use `gcr.io/distroless/python3-debian12`.
98+
> **Note**: When using Python 3.9 or 3.10, make sure to use `gcr.io/distroless/python3-debian11` as your runtime image. For Python 3.11 and above, use `gcr.io/distroless/python3-debian12`. The venv uses Python from `/usr/local` which is copied from the build stage.
9699
97100
## Examples
98101

0 commit comments

Comments
 (0)