Home >Operation and Maintenance >Docker >Why does docker start so fast
The reason why Docker starts so quickly: Docker container applications run directly in the host kernel. Starting Docker is equivalent to starting a process on the host operating system without starting a complete operating system; therefore, it can be done in seconds. Level, even millisecond startup time.
The operating environment of this tutorial: linux5.9.8 system, docker-1.13.1 version, Dell G3 computer.
Docker allows developers to package their applications and dependencies into a portable container and then publish it to any popular Linux machine, which can be virtualized. Docker has changed the way of virtualization, allowing developers to directly put their results into Docker for management. Convenience and speed are already the biggest advantages of Docker. Tasks that used to take days or even weeks can be completed in just a few seconds under the processing of Docker containers.
Why does docker start so fast?
Starting a virtual machine requires first starting the virtual machine's operating system and then starting the application. This process is very slow and often takes several minutes.
As for the docker container application, since it runs directly in the host kernel, starting Docker is equivalent to starting a process on the host operating system without starting the complete operating system; therefore, it can be started in seconds or even milliseconds. time, greatly saving development, testing, and deployment time.
Advantages of container (Docker) compared to virtual machine (VM):
Container technology | Virtual machine technology | |
Occupied disk space | Small, even dozens of KB (in the case of the mirror layer) | Very large , on GB |
Startup speed | Fast, a few seconds | Slow, a few minutes |
Running form | Run directly on the kernel of the host, different containers share the same Linux kernel | Run on Hypervisior |
A host can start thousands or hundreds of containers | Up to dozens of virtual machines | |
Close to the local host Process | is worse than the host | |
High | Low |
docker video tutorial"
The above is the detailed content of Why does docker start so fast. For more information, please follow other related articles on the PHP Chinese website!