docker-images/images/certbot/Dockerfile

32 lines
850 B
Docker
Raw Normal View History

2020-10-21 22:37:51 +00:00
ARG REPO_LOCATION
# ARG BASE_VERSION
FROM ${REPO_LOCATION}minideb AS builder
2020-11-29 01:38:06 +00:00
RUN install_packages curl ca-certificates \
&& curl -sS https://dl.eff.org/certbot-auto -o /srv/certbot-auto \
&& chmod +x /srv/certbot-auto
2020-10-21 22:37:51 +00:00
FROM ${REPO_LOCATION}minideb
COPY --from=builder /srv/certbot-auto /srv/certbot-auto
RUN /srv/certbot-auto --debug --noninteractive --install-only && \
install_packages python3-pip
WORKDIR /opt/eff.org/certbot/venv
RUN . bin/activate \
&& pip install certbot-dns-cloudflare \
&& deactivate
2020-10-21 22:37:51 +00:00
# Only required if we use acme.sh instead of certbot: openssl openssh-client coreutils dnsutils curl socat tzdata tar oathtool
2020-10-21 22:49:28 +00:00
VOLUME /srv/configdir /srv/workdir /srv/logsdir
2020-10-21 22:37:51 +00:00
USER 2000:2000
2020-10-21 22:49:28 +00:00
ENTRYPOINT [ "/usr/bin/certbot", \
"--config-dir", "/srv/configdir", \
"--work-dir", "/srv/workdir", \
"--logs-dir", "/srv/logsdir" ]