A container's filesystem is ephemeral: anything written inside it is lost when the container is removed. This module shows how to keep data around and how to put images that other people built to work.
Volume mounts attach Docker-managed storage to a container, and are the recommended, portable way to persist data in production. Bind mounts map a specific folder on your machine into the container, which is convenient for local development but ties you to that host path. The most common real-world use is a database such as PostgreSQL or Redis running from its official image with a volume attached.
You'll also use 3rd party container images from Docker Hub instead of building everything yourself, including running small command line utilities as one-off containers with docker run --rm, so you never have to install them on your host. Watch the lessons in order, then continue on to Building Container Images.
Why containers don't keep their data on their own, and how volumes and bind mounts differ, so you can pick the right one for development and for production.
How to use docker search and docker pull to find and download images from Docker Hub, the starting point for using images someone else built.
Running PostgreSQL from its official image, connecting to it, resetting it, and persisting its data with volumes, the classic real-world example of this module.
Another walk-through of keeping a Postgres database's data around with Docker, useful for seeing the same idea set up a second way.
Pulling a published image from Docker Hub and running it as a website. Pushing your own images comes up again in the Container Registries module.