Docker Volumes and Networks

Learn what storage mechanism Docker provides and how the Docker network allows containers to communicate.

We'll cover the following

Volumes

Containers do not retain state between restarts. This is generally a good thing. Any number of containers can be started from the same base image and each can handle incoming requests regardless of how or when they were launched.

However, some containers, such as databases, absolutely must retain data. So Docker provides two storage mechanism types:

  1. Volumes: a Docker-managed file system
  2. Bind mounts: a file or directory on the host machine

Get hands-on with 1400+ tech skills courses.