Trying to do something simple, and just can't figure it out. I need some guidance towards a solution, please.
I have a docker compose file that creates a volume and maps to a directory elsewhere in the project. The desired outcome is having the contents of the "elsewhere" directory to be copied into the "created" volume.
Running the docker compose file creates the volume, but does not copy the files from the "elsewhere" directory.
Here is some code:
docker compose yml:
services:
api:
volumes:
- ./data/media/audio:/test/media/audio
This creates a '/data/media/audio' on my machine and inside of the docker container (the 'created' volume), but does not copy the files from '/test/media/audio' (the 'elsewhere' volume) into '/data/media/audio'. All that is missing from this process is copying the '/test/media/audio' files into '/data/media/audio'.
I've spent the afternoon researching this problem and simply can't find a solution. At this point I'm not even sure what to look for. Any help is greatly appreciated.
Thanks!