diff --git a/Dockerfile b/Dockerfile index 033ecd8..c394c9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,12 @@ -FROM python:latest +FROM python:3.10-alpine AS build -RUN apt update && apt install certbot -y -RUN pip install certbot-dns-safedns +RUN apk add --no-cache py3-pip alpine-sdk libffi-dev +RUN python3 -m venv /opt/venv +ENV PATH="/opt/venv/bin:$PATH" +RUN pip install certbot certbot-dns-safedns + +FROM python:3.10-alpine +COPY --from=build /opt/venv /opt/venv +ENV PATH="/opt/venv/bin:$PATH" ENTRYPOINT ["certbot", "--authenticator", "dns_safedns", "--dns_safedns-credentials", "/etc/letsencrypt/safedns.ini"]