Docker Volume

Docker Volume

What is Docker Volume?

Volume is a particularly labeled directory contained by one or more than one container that bypasses the UFS (Union File System). Volumes are intended to persist data, self-determining the container’s life cycle. However, Docker never deletes volumes automatically when you remove the container, and it will not “garbage collect” volumes that are no longer needed by the container. Also known as data volume

There are three types of volumes

  • Host
  • Anonymous
  • Named


1- Host

Host volume lives on the Docker host’s file system and can be easily accessed from within the container.


2- Named

Named volume is managed by Docker somewhere on disk the volume is created, however, it is given a name.


3- Anonymous

Anonymous volume is very similar to the named volume, but, it can be challenging, to refer to the matching volume over time when it is an anonymous volume. Docker handles where the files are stored.

Pages tagged with volume

Page Description
Network containers How Docker network container
Configuring Azure Files Storage for Kubernetes Learn how to add persistent storage to your Docker Enterprise clusters running on Azure with Azure Disk.
Using CSI drivers Learn to deploy a CSI driver with UCP.
Configuring iSCSI for Kubernetes Learn how to configure iSCSI.
Configuring NFS Storage for Kubernetes Learn to add support for NFS persistent storage by adding a default storage class.


Manage Volumes

API 1.21+ The daemon and client API need both be at a minimum of 1.21 to use this command. Use the Docker version command on the client to check your daemon and client API versions.




Child Commands

Command Description
docker volume create Create a volume
docker volume inspect Display detailed information on one or more volumes
docker volume ls List volumes
docker volume prune Remove all unused local volumes
docker volume rm Remove one or more volumes


Parent Command

Command Description
docker The base command for the Docker CLI.



NCERT-NOTES Class 6 to 12.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Back to top button