Chapter Summary

This lesson is a summary of the contents learned in this chapter.

There are two main types of data: persistent and non-persistent data. Persistent data is data that you need to keep, non-persistent is data that you don’t need to keep. By default, all containers get a layer of writable non-persistent storage that lives and dies with the container — we call this local storage and it’s ideal for non-persistent data. However, if your containers create data that you need to keep, you should store the data in a Docker volume.

Docker volumes are first-class citizens in the Docker API and are managed independently of containers with their own docker volume sub-command. This means that deleting a container will not delete the volumes it was using.

Third-party volume plugins can provide Docker access to specialized external storage systems. They’re installed from Docker Hub with the docker plugin install command and are referenced at volume creation time with the -d command flag.

Volumes are the recommended way to work with persistent data in a Docker environment.

Get hands-on with 1000+ tech skills courses.