I have a Nginx server running on Docker
on a Ubuntu host and I wanted to integrate Letsencrypt
certificates on it. As I had the Nginx
image already created with all the conf setup, after reading different articles I decided to install Letsencrypt on the host and mount the /etc/letsencrypt/
folder in a shared volume in the Nginx
container. The problem I had is that symlinks belongs to the file system itself and cannot be resolved by the container which makes sense.
My question is then: what would be the best way to approach this: Should I add all the Letsencrypt
setup inside my Nginx
custom Dockerfile to get it up and running? Is it possible though to create a separate container which only has Letsencrypt
and share a volume from there? Or is it possible somehow to resolve this via changes on my current solution?
Note that at the moment I'm creating a copy of the certificates and pasting them into the volume which is fine but I want to automate the renewal (using certbot renew --dry-run
).
Any help is much appreciated!