Suggest an editImprove this articleRefine the answer for “What is the difference between Docker and a virtual machine?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Docker** isolates only the application and its environment using the host system's kernel, while a **virtual machine** emulates an entire operating system. **Key point:** Docker means lightweight isolation and fast deployment, while a virtual machine is a heavy but fully independent environment.Shown above the full answer for quick recall.Answer (EN)ImageBriefly and to the point: ### **1. Isolation level** - **Virtual machine (VM)** - emulates an entire OS (kernel, drivers, services). - **Docker** - isolates only the application and its environment, uses the host system's kernel. ### **2. Speed** - **VM** - slow startup (seconds/minutes), heavy. - **Docker** - starts in a fraction of a second, lightweight container. ### **3. Resource usage** - **VM** - uses a lot of RAM/CPU, each virtual machine contains an entire OS. - **Docker** - containers are "thin", share host resources, minimal overhead. ### **4. Flexibility** - **VM** - suitable when a separate full-fledged system is needed. - **Docker** - when many isolated services are needed that are easy to deploy and update. ### **5. Key metaphor** - **VM** - is a *separate house* (with its own roof, foundation, and utilities). - **Docker** - *rooms inside one house*: isolated, but sharing common walls and infrastructure. **Summary:** Docker is lightweight isolation and fast deployment. A virtual machine is heavy but a fully independent environment.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.