Volumes

Volumes

Management by Docker

Only accessible by containers

Demo

docker volume create foo
docker volume ls

Mount a volume:

docker run -it --volume foo:/src --workdir /src ubuntu

Remove a volume:

docker volume rm foo

Find a volume on the disk:

docker volume inspect foo
cat "$(docker volume inspect foo | jq -r '.[].Mountpoint')/foo"