Skip to content
masterclass Buddy

Docker · Directive

VOLUME

The Docker VOLUME instruction declares a path for data stored outside a container's writable layer. Use a named volume for data owned by the application and a bind mount for files edited on the host.

Last updated

Syntax

VOLUME ["/path"]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • VOLUME
  • volumes
  • bind mounts
  • docker volume
  • --mount
  • :ro

Source: Keep data with volumes and bind mounts. Checked 2026-11-03.