Docker 29 cheatsheet

Docker 29: Volumes and networks

5 common Docker 29 tasks.

Create a volume

Create a named volume for data that should outlive containers.

docker volume create mydata

List volumes

List the volumes on this Docker host.

docker volume ls

Remove a volume

Delete a volume that no container uses.

docker volume rm mydata

Caution: Deleting a volume deletes the data in it.

Create a network

Create a user-defined network where containers can reach each other by name.

docker network create mynet

List networks

List the networks on this Docker host.

docker network ls

Was this page helpful?