Docker Volumes (EN)

Concept

Mechanism for persistent data storage independent of the container lifecycle

Docker Volumes

Docker Volumes are a mechanism for persistent data storage that exists independently of a container's lifecycle. They are used for databases, configuration files, and other persistent information that must survive container restarts. Unlike Bind-Mounts, Volumes are fully managed by Docker, making them safer and more reliable for production applications.

Architecture

flowchart TD     A[Docker Host] --> B[Docker Engine]     B --> C[Docker Volume]     B --> D[Container 1]     B --> E[Container 2]     D --> C     E --> C     C --> F[Host Filesystem] 

In Context

  • Typically used together with Docker Compose
  • Related to: Bind Mounts, Docker Networks, Container Lifecycle
  • Example use: Persistent databases in containers
Quelle: AI Generated