Home>

Can you tell me how to write docker-compose because I don't know the explanation here ↓?
http://docs.docker.com/compose/compose-file.html#volumes-volume-driver

Described as below, but

  

Mount path or named volume optionally on host machine (host: container)
  Path specification and access mode (host: container: rw) can be specified.
  Version 2 files use the top level volumes key to use named volumes
  Must be specified.
  For version 1, if the volume doesn't exist, Docker Engine will create it automatically.

Connect host and container paths by connecting them with a colon in the format of "host: container"
I understood that it was, but there was a way of writing without a colon as shown below.

  

version:"2"
  (Omitted)
   test-ng_db:
     image: mongo: 3.4.9
     volumes_from:
       -test-ng_db_data
     command: mongod --storageEngine wiredTiger
   test-ng_db_data:
     image: busybox: latest
     volumes:
       -/ data/db

In this case, "/ data/db" is like the container side (because it is not on the host side), but
What are the settings?