Docker-Compose: how to mapping volume from host into container?
问题 The Problem: I'd like to share a folder from the docker host with a specific container using docker-compose. A container running MongoDB shall place its data files into /var/lib/mongodb, but this folder shall be a mount to the hosts folder /var/lib/mongodb. But it still remains an own local directory within the container, not the shared one from the host. Sometimes it also ends up with the following warning: WARNING: Service "mongodb" is using volume "/var/lib/mongodb" from the previous