Skip to content

Volumes vs bind mounts

Select an icon to see what it is.

Step 1 of 6

A named volume is created by dockerd

A named volume is a directory that dockerd creates and owns. POST /volumes/create makes it under /var/lib/docker/volumes/<name>/_data, and docker run creates it for you if it does not exist.

$ docker volume create pgdata
PrevNext

POST /v1.45/volumes/create

{
"Name": "pgdata"
}