I am running certbot via docker-compose service for my web application and getting permission denied trying to read the cloudflare.ini mounted from the host at /etc/cloudflare/cloudflaire.ini to the image at /root/cloudflare.ini. Based on logs the nightly renewal check was working fine for months until until 3/5/24 and I am not sure why. I tried running as the same UID as the host which is "1000:1000" but there is no UID with 1000 on the certbot image since I believe it is running as root. How can I troubleshoot this? Is there a Dockerfile somewhere for the certbot/dns-cloudflare image?
certbot:
image: certbot/dns-cloudflare
volumes:
- certbot_etc:/etc/letsencrypt
- /etc/cloudflare/cloudflare.ini:/root/cloudflare.ini
command: >-
certonly --dns-cloudflare
--dns-cloudflare-credentials /root/cloudflare.ini
--dns-cloudflare-propagation-seconds 60
--email contact@example.com
--agree-tos --no-eff-email
--keep-until-expiring
logs:
certbot-1 | Saving debug log to /var/log/letsencrypt/letsencrypt.log
certbot-1 | Renewing an existing certificate for example.com and *.example.com
certbot-1 | An unexpected error occurred:
certbot-1 | PermissionError: [Errno 13] Permission denied: '/root/cloudflare.ini'
certbot-1 | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.