i'm trying run docker-compose operation spawns redis , mongodb instance , (should) provide mongodb instance data-file host pc through volumes specification.
i can boot container using following docker-compose.yml:
redis: image: redis ports: - "6379:6379" mongo: image: mongo:latest volumes: - ./data/db:/data/db ports: - "27017:27017" command: --rest assuming should 'mount' directory data/db of data dir next docker-compose.exe file.
i can connect both redis , mongodb, simple query on collection performing count() returns 0 (which should contain data). leads me believe mounting of volumes property isn't working.
if check file structure on container don't see /data folder... am missing here... lead!
what showing filesystem of boot2docker, tinycore-based linux host runs docker daemon.
not:
- where local
./data/db(it should right besidedocker-compose.ymlfile) - where mounted
/data/dbis: should mounted in mongo container
and works if files in c:\users\... or /users/..., host folder mounted virtualbox in linux vm.
to check if mount has taken place, docker exec mongo bash, open bash in container , check ls /data.


Comments
Post a Comment