Skip to content

Commit

Permalink
[docker] Build with 3.12 image (#4055)
Browse files Browse the repository at this point in the history
Test:
```
crl-m1:black cooper$ docker build --tag black_3_12 .
...
 => [stage-1 2/2] COPY --from=builder /opt/venv /opt/venv                                                                                                                                                  0.2s
 => exporting to image                                                                                                                                                                                     0.1s
 => => exporting layers                                                                                                                                                                                    0.1s
 => => writing image sha256:bd66acc9d76d2c40d287b0684ce6601401631e0468204c4e6a81f8f1eebaf1dd                                                                                                               0.0s
 => => naming to docker.io/library/black_3_12

crl-m1:black cooper$ docker image ls | grep black_3_12
black_3_12                     latest            bd66acc9d76d   59 seconds ago   193MB
```
  • Loading branch information
cooperlees authored Nov 19, 2023
1 parent 80a166f commit 96faa3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
### Integrations

- Enable 3.12 CI (#4035)
- Build docker images with 3.12 (#4055)

### Documentation

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim AS builder
FROM python:3.12-slim AS builder

RUN mkdir /src
COPY . /src/
Expand All @@ -12,7 +12,7 @@ RUN . /opt/venv/bin/activate && pip install --no-cache-dir --upgrade pip setupto
&& cd /src && hatch build -t wheel \
&& pip install --no-cache-dir dist/*-cp*[colorama,d,uvloop]

FROM python:3.11-slim
FROM python:3.12-slim

# copy only Python packages to limit the image size
COPY --from=builder /opt/venv /opt/venv
Expand Down

0 comments on commit 96faa3b

Please sign in to comment.