I’m trying to mount a volume from my host into a container but it is empty. Am I doing something wrong or could this be a bug? Detailed reproduction instructions at the bottom.
Expected behavior
Mounted volume inside container contains the same data as the host
Actual behavior
Mounted volume inside container is empty
Information
Docker for Mac: version: mac-v1.12.0-beta20
OS X: version 10.11.6 (build: 15G7b)
logs: /tmp/20160726-095256.tar.gz
[OK] docker-cli
[OK] app
[OK] moby-syslog
[OK] virtualization
[OK] menubar
[OK] system
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux
Steps to reproduce the behavior
mkdir -p project/server && touch foobar.txt- Put this
docker-compose.ymlinproject:
db:
image: mongo:latest
ports:
- "27017:27017"
server:
image: artificial/docker-sails:stable-pm2
command: sails lift
volumes:
- server/:/server
ports:
- "1337:1337"
links:
- db
docker-compose updocker ps # to get CONTAINER IDdocker exec CONTAINER ID ls -l /server