docker daemon means: Docker daemon; the main functions of daemon include image management, image construction, REST API, authentication, security, core network and orchestration.
The operating environment of this tutorial: linux5.9.8 system, docker-1.13.1 version, Dell G3 computer.
Docker Daemon
##Daemon is the daemon process of Docker. Docker Client communicates with Docker Damon through the command line Communicate and complete Docker related operations. The main functions of daemon include image management, image construction, REST API, authentication, security, core network and orchestration.Working mechanism
Docker Daemon can be thought of as accepting Docker Client requests through the Docker Server module, processing the requests in the Engine, and then creating the specified Job and run it, the role of the running process has the following possibilities: obtain the image from Docker Registry, perform localization operations of the container image through graphdriver, perform configuration of the container network environment through network driver, perform execution work inside the container through execdriver, etc. .Modify Docker Daemon
Docker Daemon has different modification methods: command line modification, modification of startup items, modification of configuration files.Startup process
Since the startup of Docker Daemon and Docker Client are completed through the executable file docker, the startup of both The process is very similar. When the Docker executable file is run, the running code distinguishes the two through different command line flag parameters, and finally runs the corresponding parts of the two. When starting Docker Daemon, you can generally use the following commands: docker --daemon=true; docker –d; docker –d=true, etc. Then the docker's main() function parses the corresponding flag parameters of the above commands, and finally completes the startup of the Docker Daemon. Through the flow chart of Docker Daemon, we can draw the conclusion that all work related to Docker Daemon is included in the implementation of the mainDaemon() method. Macroscopically speaking, mainDaemon() completes the creation of a daemon process and makes it run normally. From a functional perspective, mainDaemon() implements two parts: first, creating a Docker operating environment; second, serving the Docker Client, receiving and processing corresponding requests. In terms of implementation details, the implementation process of mainDaemon() mainly includes the following steps: 1) Daemon configuration initialization (this part is implemented in the init() function, that is, in mainDaemon() ) is executed before running, but since this part is closely related to the running of mainDaemon(), it can be considered as a prerequisite for the running of mainDaemon(); 2) Command line flag parameter check; 3) Create an engine object; 4) Set the signal capture and processing method of the engine; 5) Load builtins; 6) Use goroutine to load the daemon object and run it ; 7) Print the Docker version and driver information; 8) Create and run the "serveapi" job. Recommended learning: "docker video tutorial"
The above is the detailed content of What does docker daemon mean?. For more information, please follow other related articles on the PHP Chinese website!