Docker & Containers
Containers vs virtual machines
Compare containers and virtual machines, and learn how isolation and resource sharing affect their security and operation.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Docker & Containers
- docker run, ps, logs, exec and stopBeginner · 5 min
Five commands cover most container tickets: start it, see it, read what it said, get inside it, stop it. Learn what each one touches and what it leaves behind.
- Images, tags and registriesBeginner · 5 min
An image is a read-only package; a container is one running copy of it. Tags are movable labels on images, which is why 'it worked yesterday with latest' is a real bug.
- Writing a Dockerfile: FROM, COPY, RUN, CMDBeginner · 6 min
A Dockerfile is a short recipe that turns your code into an image. Five instructions cover most files, and the hard part is knowing which ones run when you build and…
- Volumes, bind mounts and environment variablesBeginner · 6 min
Removing a container deletes its writable layer; data in separate volumes or bind mounts can remain. Volumes keep data alive past the container, and environment…