docker CLI <==[ Docker Engine API ]==> dockerd
The docker CLI communicates with a docker daemon using the Docker Engine API. The latest version is v1.41
The CLI and daemon don't need to be on the same machine. By setting the docker context, you can direct the docker CLI to communicate with a remote docker daemon, hence without installing Docker locally. Similarly, if you issue Docker Engine API calls using curl
or any other SDK, you may use unix:///var/run/docker.sock for the local daemon (if installed), or the URL of the remote daemon.
dockerd <==[ Docker Registry API ]==> Docker Registry
The docker daemon communicates with a docker registry using the Docker Registry API. The latest version is v2. A docker pull alpine
tells the daemon at the current context to issue a Docker Registry API call to the https://registry-1.docker.io/v2
endpoint at DockerHub, while docker pull registry.gitlab.com/username/image:tag
tells the daemon to issue a Docker Registry API call to the https://registry.gitlab.com/v2
endpoint at your private GitLab container registry.