docker-compose volume not mounting correctly docker-compose volume not mounting correctly flask flask

docker-compose volume not mounting correctly


The issue is that you can't mount a volume to an existing path in the container and expect the data within that path to be syncd. This is not how unix volume mounts work.

An explanation can be found here:

https://github.com/moby/moby/issues/32203

Have a look here if you need to make data inside a container persistent:

https://github.com/moby/moby/issues/4361#issuecomment-36317097


Remove the following from your Dockerfile:

# add appADD . /usr/src/app

Review the answer here for more info:

https://stackoverflow.com/a/27753725/1799408