What Survives a Container

Which files survive a container: the writable layer, and the bind mounts and volumes that keep data after it is gone.

  • 5 cards
  • 3 questions
  • About 5 min
  • Beginner to Intermediate
Share

Where a container's files go and which of them survive. Everything a container writes lands in a layer that is deleted with the container, which is fine until the first time it takes a database with it. It covers the writable layer, what docker rm destroys, the two kinds of mount that keep data (bind mounts and named volumes), and the way a mount hides what the image put at the same path. It leaves out storage drivers and volume plugins.

Contents

5 cardsnot started