Docker:Volume
lastmod 2022-03-24created 2015-12-107 edits
Sharing files with host machine
$ docker run -v [HOST_PATH]:[GUEST_PATH] [IMAGE_NAME]
## 만약 Host머신의 작업 디렉토리를 공유하고 싶다면 아래와 같이 사용하면 된다.
$ docker run -v $PWD:/data ubuntu:14.04 /bin/bash
Checking the size of volume files
Flags
- delegated
- The container-side file system content is authoritative. Changes on the container side may take time to be reflected on the host side.
- cached
- The host-side file system content is authoritative. Changes on the host side may take time to be reflected in the container.
- consistent
- The container and host are fully synchronized.
- default
- Same as consistent. If no flag is given, it is default. There is a decisive difference from consistent: with consistent, overlapping mounted volumes override deleagted and cached, whereas with default they are not overridden.
Plugins
Network plugins
Volume plugins
- Netshare plugin
- A volume plugin that provides volume management for NFS 3/4, AWS EFS and CIFS file systems.
- https://github.com/ContainX/docker-volume-netshare
- http://netshare.containx.io/
See also
Favorite site
- Manage data in containers
- Docker for the Really Impatient, Chapter 6 - 4. Using Docker data volumes
- Docker for the Really Impatient, Chapter 6 - 5. Using Docker data volume containers
- Sharing files with host machine
- Managing data with volumes
- How to use docker volumes and their differences
- Joinc - Managing Docker container data volumes
NFS volume
Pages that link here