Docker Community Forums

Share and learn in the Docker community.

Mount host directory holding symbolic links

Hello, I am using docker-compose to create an Apache2 and certbot stack but today I ran into a problem that I’m not sure how to overcome. So certbot stores the certificates (according to the docs) in “conf/live/${main_domain}” and in this directory the files are symbolic links to “conf/archive/${main_domain}” so when I just mount the folder “conf/live/${main_domain}” from host to apache2 the certificates don’t work as they are pointing to a directory that doesn’t exist inside of apache2. I’m only pointing the certificates into apache2 as I find it is safer to do this then to mount the entire certbot folder. How can I mount the certificates like I am using docker-compose without the symbolic links (copy the files using the cp -L)?