certbot-cron-docker/Dockerfile
2022-06-18 23:08:39 +00:00

23 lines
504 B
Docker

FROM debian:bullseye-slim
RUN apt update && apt install -y bash cron python3 python3-venv procps tini
RUN python3 -m venv /opt/certbot/ && /opt/certbot/bin/pip install --upgrade pip
RUN /opt/certbot/bin/pip install certbot certbot-dns-cloudflare && \
ln -s /opt/certbot/bin/certbot /usr/bin/certbot
RUN mkdir -p /config
COPY run.sh / renew.sh /
RUN chmod +x /run.sh /renew.sh
ENV DOMAINS=
ENV EMAIL=
ENV INTERVAL="0 */6 * * *"
ENV STAGING=false
ENTRYPOINT ["/usr/bin/tini", "-s", "/run.sh"]