Skip to content

Commit f0cc6cb

Browse files
committed
chore: Update to Debian 12 and Python 3.11
* Use python for the pip_compile ci script The distroless image for Python no longer contains `sh`. * Don't upgrade pip This should make the image smaller, build faster, and avoid issues of newer versions of pip breaking pip-tools. * Update dependencies as resolved by new pip-compile run. * aioquic 1.2.0 to 1.3.0 * pylsqpack 0.3.22 to 0.3.23 Signed-off-by: Erik Swanson <[email protected]>
1 parent 756b35b commit f0cc6cb

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

.github/workflows/update.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
id: update
2121
run: |
2222
docker create --name=pip-compile \
23-
--entrypoint /bin/sh \
23+
--entrypoint python \
2424
--interactive \
2525
--user root \
2626
--workdir /tmp \
2727
$IMAGE
2828
2929
docker cp requirements.in pip-compile:/tmp/
3030
31-
docker start --attach --interactive pip-compile < ci/pip-compile.sh
31+
docker start --attach --interactive pip-compile < ci/pip_compile.py
3232
3333
mv requirements.txt requirements.txt.orig
3434
docker cp pip-compile:/tmp/requirements.txt .

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
FROM debian:11-slim@sha256:75e0b7a6158b4cc911d4be07d9f6b8a65254eb8c58df14023c3da5c462335593 AS build
1+
FROM debian:12-slim@sha256:936abff852736f951dab72d91a1b6337cf04217b2a77a5eaadc7c0f2f1ec1758 AS build
22
RUN apt-get update \
33
&& apt-get install --no-install-suggests --no-install-recommends --yes \
44
gcc \
55
libpython3-dev \
66
libssl-dev \
77
python3-venv \
88
&& rm -rf /usr/local \
9-
&& python3 -m venv /usr/local \
10-
&& /usr/local/bin/pip install --upgrade pip setuptools wheel
9+
&& python3 -m venv /usr/local
1110

1211
COPY requirements.txt /requirements.txt
1312

1413
RUN /usr/local/bin/pip install --disable-pip-version-check -r /requirements.txt
1514

16-
FROM gcr.io/distroless/python3-debian11:nonroot@sha256:f3331305dc14092a6df5a23733b3afc5806da8bab8089e63f441221ebcdb7cfb
15+
FROM gcr.io/distroless/python3-debian12:nonroot@sha256:1a7c3d2445f783c51be174c8913624dc5bea2cd7ff1f94b9a229a16f0e40fa34
1716

1817
COPY --from=build /usr/local /usr/local
1918

ci/pip-compile.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

ci/pip_compile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import subprocess
2+
3+
# Install pip-tools for the pip-compile command
4+
subprocess.check_call(["/usr/local/bin/pip", "install", "--disable-pip-version-check", "pip-tools"])
5+
6+
# Run pip-compile to generate requirements.txt
7+
subprocess.check_call(["/usr/local/bin/pip-compile", "requirements.in"])

ci/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# If python has been upgraded, we need to make sure it's in sync with the
77
# build step and the constraint in renovate.json
8-
if sys.version_info.major != 3 or sys.version_info.minor != 9:
8+
if sys.version_info.major != 3 or sys.version_info.minor != 11:
99
sys.exit(sys.version_info)
1010

1111
# Check that pycrypto isn't broken

requirements.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.9
2+
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
55
# pip-compile requirements.in
66
#
7-
aioquic==1.2.0
7+
aioquic==1.3.0
88
# via pproxy
99
asyncssh==2.21.1
1010
# via pproxy
@@ -32,7 +32,7 @@ pycparser==2.23
3232
# via cffi
3333
pycryptodome==3.23.0
3434
# via pproxy
35-
pylsqpack==0.3.22
35+
pylsqpack==0.3.23
3636
# via aioquic
3737
pyopenssl==25.3.0
3838
# via aioquic
@@ -41,7 +41,6 @@ service-identity==24.2.0
4141
typing-extensions==4.15.0
4242
# via
4343
# asyncssh
44-
# cryptography
4544
# pyopenssl
4645
uvloop==0.22.1
4746
# via pproxy

0 commit comments

Comments
 (0)