Skip to content

Commit 14f3af0

Browse files
authored
Update python.Dockerfile
Signed-off-by: Zoey <[email protected]>
1 parent a770305 commit 14f3af0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python.Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# syntax=docker/dockerfile:labs
2+
FROM python:3.13.1-alpine3.21 AS certbot
3+
COPY requirements.txt /tmp/requirements.txt
4+
RUN apk upgrade --no-cache -a && \
5+
apk add --no-cache ca-certificates build-base libffi-dev && \
6+
python3 -m venv /usr/local && \
7+
pip install --no-cache-dir -r /tmp/requirements.txt
8+
29
FROM python:3.13.1-alpine3.21
310
ENV PYTHONUNBUFFERED=1
411
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
@@ -9,6 +16,7 @@ RUN apk upgrade --no-cache -a && \
916
apk add --no-cache ca-certificates tzdata tini zlib luajit pcre2 libstdc++ yajl libxml2 libxslt libcurl lmdb libfuzzy2 lua5.1-libs geoip libmaxminddb-libs && \
1017
ln -s /usr/local/nginx/sbin/nginx /usr/local/bin/nginx && \
1118
ln -s /usr/local/openssl/.openssl/bin/openssl /usr/local/bin/openssl
19+
COPY --from=certbot /usr/local /usr/local
1220

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

0 commit comments

Comments
 (0)