Storage on Docker

By default, all the files created inside a container are stored on a writable container layer. This means:

  • the data is not persistent
  • You can’t easily move the data somewhere else

Docker storage types

Storage types:

Example:

docker run -v path/on/host:/app nginx:latest