Docker Community Forums

Share and learn in the Docker community.

Docker volume overlaying

Hey, i have a folder in my container called templates and what i want is that this volume gets synced to a folder on the host and they then mirror eachother. I have already tried this in the shape of - '${PWD}/templates/:/home/beastbilling/templates/' but that doesn’t keep the original content of templates but overrides it with a empty folder on the host and in the container.

Help is welcome

tldr;
a volume that is copied from the container on first run and then mirrorred like a normal volume.

Hi :slight_smile:

When you mount, the host folder, will be replicated to the container.
what you need to do, is to store the templates in a different folder in the container, then in your startup script, copy those files into the right folder