Skip to content

Commit c260263

Browse files
committed
Upgrade the Docker base image to Python 3.12
Python 3.8 is past EOL. The slim image also needs setuptools and wheel for setup.py install.
1 parent 464ca34 commit c260263

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8-slim
1+
FROM python:3.12-slim
22

33
ENV APP_DIR=/usr/src/snappass
44

@@ -11,11 +11,10 @@ WORKDIR $APP_DIR
1111
COPY ["setup.py", "requirements.txt", "MANIFEST.in", "README.rst", "AUTHORS.rst", "$APP_DIR/"]
1212
COPY ["./snappass", "$APP_DIR/snappass"]
1313

14-
RUN pip install -r requirements.txt
15-
16-
RUN pybabel compile -d snappass/translations
17-
18-
RUN python setup.py install && \
14+
# setuptools is required for setup.py install on modern Python slim images
15+
RUN pip install --no-cache-dir -r requirements.txt setuptools wheel && \
16+
pybabel compile -d snappass/translations && \
17+
python setup.py install && \
1918
chown -R snappass $APP_DIR && \
2019
chgrp -R snappass $APP_DIR
2120

0 commit comments

Comments
 (0)