I have followed this very useful guide as to how to setup certbot in a docker container. I have a certificate and I have a scheduled task to run certbot renew every day. The next part is restarting my other docker instance when the certificates renew.
The guide does this by copying certificates from one folder to another and seeing if the copied certificates are older than the certificates downloaded by certbot. This seems fair enough but I'd rather not have to copy and I am pretty sure that I saw somewhere that certificates should not be copied and you should just use them in place.
Are there any suggestions as to how I would only restart my other container if a new certificate has been issued? I'll be writing a bash script that will run the renewe command. I could probably store the certificate date before running renew and then compare that after renew has run... but my bash skills are very poor, or non existent!
You can mount the docker socket and issue commands to other containers, but you need to install the docker executable in the certbot container (or find another way to send an api call to the docker daemon).