docker-images/images/certbot/Dockerfile

33 lines
915 B
Docker
Raw Permalink 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 \
2020-11-29 15:59:12 +00:00
&& deactivate \
&& ln -s /opt/eff.org/certbot/venv/bin/certbot /usr/bin/certbot
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
2020-11-29 17:02:06 +00:00
USER 999:994
2020-10-21 22:49:28 +00:00
ENTRYPOINT [ "/usr/bin/certbot", \
"--config-dir", "/srv/configdir", \
"--work-dir", "/srv/workdir", \
"--logs-dir", "/srv/logsdir" ]