FROM debian:buster-slim

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        certbot \
        python3-certbot-dns-rfc2136 \
        cron \
    && rm -rf /var/lib/apt/lists/*

COPY certbot-renew /etc/cron.d/

VOLUME ["/etc/letsencrypt"]

CMD ["cron", "-f"]
