Skip to content

Commit

Permalink
Update python.Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Jan 1, 2025
1 parent a770305 commit 14f3af0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# syntax=docker/dockerfile:labs
FROM python:3.13.1-alpine3.21 AS certbot
COPY requirements.txt /tmp/requirements.txt
RUN apk upgrade --no-cache -a && \
apk add --no-cache ca-certificates build-base libffi-dev && \
python3 -m venv /usr/local && \
pip install --no-cache-dir -r /tmp/requirements.txt

FROM python:3.13.1-alpine3.21
ENV PYTHONUNBUFFERED=1
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
Expand All @@ -9,6 +16,7 @@ RUN apk upgrade --no-cache -a && \
apk add --no-cache ca-certificates tzdata tini zlib luajit pcre2 libstdc++ yajl libxml2 libxslt libcurl lmdb libfuzzy2 lua5.1-libs geoip libmaxminddb-libs && \
ln -s /usr/local/nginx/sbin/nginx /usr/local/bin/nginx && \
ln -s /usr/local/openssl/.openssl/bin/openssl /usr/local/bin/openssl
COPY --from=certbot /usr/local /usr/local

ENV OPENSSL_CONF=/usr/local/openssl/.openssl/openssl.cnf
ENTRYPOINT ["tini", "--", "nginx"]
Expand Down

0 comments on commit 14f3af0

Please sign in to comment.