기본 콘텐츠로 건너뛰기

4월, 2020의 게시물 표시

docker volume file removed

I'd like to link specfic file between 2 container (some config.json) there is no issue if file is generated when container is running (e.g log file) but if file is exist(not generated continually) when container run, file was removed. * host > container * docker volume ls how to create docker volume create 1) Dockerfile volume ["/test/path"]    // creaetd: /var/lib/docker/volumes/{volume_name} 2) docker run -itd -v /host/test/path:/container/test/path ubuntu 3) docker create volume test_path     docker run -itd -v test_path:/container/test/path ubuntu    // creaetd: /var/lib/docker/volumes/{volume_name} Diff between 2 and 3 2 - mount based on host volume (override host volume) 3 - mount : host volume > container (if host empy then... container)