docker-compose: define mount for bind mount and managed mount

前端 未结 4 972
醉酒成梦
醉酒成梦 2021-02-01 15:17

I\'m using docker-compose for defining my service. In docker, there are two concepts for docker volume. Firstly is about bind mount: mount on host storage.

4条回答
  •  既然无缘
    2021-02-01 15:45

    You can find these Docker concepts in the volumes section of Docker Compose: https://docs.docker.com/compose/compose-file/#/volumes-volumedriver

    Examples:

    volumes:
      # Just specify a path and let the Engine create a volume
      - /container/location
    
      # Specify an absolute path mapping
      - ./myfolder/location:/container/location
    

提交回复
热议问题