Cheatsheet Pages / Docker Cheatsheet

How to keep data in Docker volumes — create, list, delete

Containers get deleted; your data must not. Named volumes survive container deletion.

docker volume create webdata    # named volume (survives container deletion)
docker volume ls                # list them
docker volume rm webdata        # ⚠️ deletes the data — double-check the name

Good to know

Deleting a volume deletes the data in it — double-check the name first.

Docker Cheatsheet one-page card — commands that actually work
The full one-page card — Docker Cheatsheet. Get the complete cheatsheet on GitHub