How is Docker different from a virtual machine?

前端 未结 20 2668
闹比i
闹比i 2020-11-21 22:36

I keep rereading the Docker documentation to try to understand the difference between Docker and a full VM. How does it manage to provide a full filesystem, isolated network

20条回答
  •  长情又很酷
    2020-11-21 23:39

    There are many answers which explain more detailed on the differences, but here is my very brief explanation.

    One important difference is that VMs use a separate kernel to run the OS. That's the reason it is heavy and takes time to boot, consuming more system resources.

    In Docker, the containers share the kernel with the host; hence it is lightweight and can start and stop quickly.

    In Virtualization, the resources are allocated in the beginning of set up and hence the resources are not fully utilized when the virtual machine is idle during many of the times. In Docker, the containers are not allocated with fixed amount of hardware resources and is free to use the resources depending on the requirements and hence it is highly scalable.

    Docker uses UNION File system .. Docker uses a copy-on-write technology to reduce the memory space consumed by containers. Read more here

提交回复
热议问题