Skip to content

Commit

Permalink
Merge pull request #54 from ukfast/improve-image-size
Browse files Browse the repository at this point in the history
Improve Docker image size
  • Loading branch information
miff2000 authored Feb 18, 2022
2 parents 078c754 + c291df6 commit 796ade9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 796ade9

Please sign in to comment.