DevOps Peach

Docker & Kubernetes · Module 04

Docker Storage – Volumes, Bind Mounts and Storage Drivers

Understand why data inside a container is easy to lose, choose between volumes, bind mounts and tmpfs, manage volumes and know what a storage driver does.

Practice interactively →

What you will learn

Lessons

  1. Data in a container and the writable layer

    Files written in a container live in a thin writable layer that disappears with the container on docker rm.

  2. Three mount types — volume, bind mount, tmpfs

    Volumes are managed by Docker, bind mounts point at any host directory, tmpfs lives only in RAM.

  3. Managing Docker volumes

    Create, inspect, share and clean up volumes; a volume outlives its containers until you remove it.

  4. Storage drivers

    The storage driver stacks image layers and the writable layer on the host; overlay2 is the standard choice, and volumes bypass it.