Skip to content
Preptima
mediumConceptEntryMidSenior

What is a container image, and why is a container not a virtual machine?

A container image is layered filesystem content plus runtime config, while a container is a host process isolated by namespaces and cgroups. A virtual machine boots its own guest kernel, so the isolation boundary and startup model are different.

5 min readUpdated 2026-08-15

Answer

Short answer

A container image is a set of read-only layers and config used to start a process. A container is not a virtual machine because it shares the host kernel and gets isolation from namespaces and cgroups instead of booting a separate guest operating system.

Was this answer helpful?

Likely follow-ups

  • You add a dependency and every subsequent build reinstalls everything. What is wrong with the Dockerfile ordering?
  • How does a multi-stage build reduce the final image, and what exactly is left behind?
  • Why can a Linux container not run on a Windows kernel, and what is Docker Desktop doing about it?
  • Which is the stronger boundary for running untrusted code, and what would you use instead of a plain container?

Related questions

Masterclass guide

Further reading

Related Topics