Answer the question
In order to leave comments, you need to log in
Why doesn't Docker-compose volume mount data from container to local machine?
Hello! Please tell me why this is happening.
I have three official builds - nginx, fpm, postgres. When I assemble containers from them, the volume on postgres completely from scratch creates a local folder with a database from the container, which I didn’t have before, and the rest of the volumes are just empty folders without data.
I want to have maximum control over ngix and php, so I listen to /etc/nginx and /usr/local/etc respectively. But unlike postgres, these folders from containers are created without data and, accordingly, delete nginx and php data in containers.
Answer the question
In order to leave comments, you need to log in
Probably because volumes forwards the local directory to the container, and not vice versa.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question