First, the process of running the image
Type the commanddocker run hello-world
, run the Hello-world mirror. Then docker runs the image through the following process:
Now local to find the mirror, did not find the remote warehouse to find, found on the download to the local, and then run.
Ii. How Docker works
Docker is also a client-server structure. The docker daemon runs on the host and is accessed from the Client through sockets. The docker-server executes this command after receiving the Docker-client.
Why is Docker faster than VM
I found a comparison online.
As can be seen from the graph:
- Docker has fewer layers of abstraction than VM.
- Docker makes use of the host kernel, while VM makes use of the Guest OS, which is the system you installed into the virtual machine.
When creating a container, Docker directly utilizes the operating system of the host, bypasses the complex process of reloading the virtual system in the VM, and greatly improves the startup speed.