O'Reilly logo

Orchestrating Docker by Shrikrishna Holla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing data in containers with volumes

Some salient features of a volume in Docker are mentioned as follows:

  • A volume is a directory that is separated from the container's root filesystem.
  • It is managed directly by the docker daemon and can be shared across containers.
  • A volume can also be used to mount a directory of the host system inside a container.
  • Changes made to a volume will not be included when an image is updated from a running container.
  • Since a volume is outside the filesystem of the container, it doesn't have the concept of data layers or snapshots. Hence, reads and writes happen directly on the volume.
  • If multiple containers use the same volume, the volume persists until there is at least one container using it.

Creating a volume is easy. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required