what does VOLUME command do in Dockerfile?

前端 未结 3 1936
鱼传尺愫
鱼传尺愫 2021-02-13 01:33

I am having it difficulty in understanding added advantage of VOLUME(https://docs.docker.com/engine/reference/builder/#volume) .

In Dockerfile one can have mkdir to cre

3条回答
  •  死守一世寂寞
    2021-02-13 02:13

    The mkdir in the Dockerfile will make a directory within that container only. A volume can be on the host machine or a different container, and so remains in existence when the container is killed.

提交回复
热议问题