How does the Docker command line interact with the daemon?

Source: Internet
Author: User
Tags docker compose docker run

Translator by: Docker is a typical C/s architecture in which the Daemon (daemon) interacts with the command line (CLI) through the REST API .

Original: Understanding how the Docker Daemon and Docker CLI work Together

Translator: Fundebug

in order to ensure readability, this paper uses free translation rather than literal translation. In addition, the copyright of this article belongs to the original author, translation is only used for learning .

Docker is not a monolithic application, it is composed of multiple components. This blog will introduce the Docker Daemon (daemon) with the Docker command line (CLI). In fact, when we talk about installing or using Docker, what we mean is the Docker daemon and the command line .

Docker Frame composition
Explain the elements in:
    • The Docker Daemon (Docker daemon) is a service that runs on your operating system. Currently, it can only run on Linux because it relies on some Linux kernel features (such as Cgroup and namespace). However, there are some special ways to let Docker run on MacOS and Windows (running in a Linux virtual machine).
    • The Docker Daemon provides the REST API. Many tools (Docker command line, Docker compose, etc.) can interact with the Docker daemon through the REST API , such as creating containers, building mirrors, and so on.
    • The Docker command line (Docker CLI) is the primary tool for interacting with the Docker daemon .
Docker is the C/s architecture

Docker is the client/server architecture . Where the Docker daemon is the server, theDocker command line is one of many clients. In fact, there are many third-party Docker clients.

For a variety of popular programming languages, they all have a corresponding Docker client. If you are interested, you can also develop one and use the rest API to interact with the Docker daemon .

With the client, you can manage various elements of Docker, including mirrors, containers, networks, and data volumes. For Docker's interest, you might as well look at Dive into Docker course.

How does the Docker command line interact with the daemon?
From left to right understanding:
    • On the left is the Docker client, the Docker command line . We can run various Docker commands, such as build image (Docker build), download image (Docker pull), run container (Docker run). The Docker command line can be installed on a variety of operating systems, such as Windows,macos or Linux servers.
    • in the middle is the Docker host, which runs on top of the Docker daemon . The Docker command line makes it easy to connect to a remote docker host (given IP and port). When you "Run" Docker on MacOS and Windows, the Docker daemon is actually running in a Linux virtual machine. The key point here is that the Docker daemon and the command line can run on different hosts.
    • At the far right is the Docker repository , which is a part of the Docker ecosystem. It's where we download, upload, store, and share Docker images. The details of the Docker warehouse are irrelevant to this article, so don't repeat them.

Copyright NOTICE: Please specify the author fundebug and this address:https://blog.fundebug.com/2017/05/22/docker-cli-daemon/

How does the Docker command line interact with the daemon?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.