FROM certbot/certbot:latest # Install additional tools and python packages RUN apk add --no-cache \ curl \ jq \ bash \ dcron \ nginx \ openssl # Install dns-lexicon for DNS providers support RUN pip install dns-lexicon[full] # Create necessary directories RUN mkdir -p /app/scripts /var/log/certbot # Copy renewal scripts COPY scripts/ /app/scripts/ RUN chmod +x /app/scripts/*.sh # Copy crontab COPY crontab /etc/crontabs/root # Copy entrypoint COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh # Create a simple nginx config for HTTP challenges COPY nginx.conf /etc/nginx/nginx.conf WORKDIR /app ENTRYPOINT ["/entrypoint.sh"] CMD ["crond", "-f", "-l", "2"]