In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about how to understand the Docker architecture, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
The core components of Docker include:
Docker client-Client
Docker Server-Docker daemon
Docker Image-Image
Registry
Docker container-Container
Docker architecture
Docker uses the Client/Server architecture. The client sends requests to the server, which is responsible for building, running, and distributing containers. The client and the server can run on the same Host, and the client can communicate with the remote server through socket or REST API.
Docker client
The most commonly used Docker client is the docker command. With docker, we can easily build and run containers on Host.
Docker supports many operations (subcommands), which will be used step by step later.
In addition to the docker command line tool, users can also communicate with the server through REST API.
Docker server
Docker daemon is a server component that runs as a Linux background service.
Docker daemon runs on Docker host and is responsible for creating, running, monitoring containers, building and storing images.
By default, Docker daemon can only respond to client requests from the local Host. If you want to allow remote client requests, you need to turn on TCP snooping in the configuration file as follows:
Edit the configuration file / etc/systemd/system/multi-user.target.wants/docker.service and add-H tcp://0.0.0.0 after the environment variable ExecStart to allow client connections from any IP.
If you are using a different operating system, the location of the configuration file may be different.
Restart Docker daemon.
The server IP is 192.168.56.102, and the client can communicate with the remote server by adding the-H parameter to the command line.
The info subcommand is used to view information about the Docker server.
Docker Mirror
You can look at the Docker image as a read-only template, which allows you to create a Docker container.
For example, an image may contain a Ubuntu operating system, an Apache HTTP Server, and a user-developed Web application.
There are several ways to generate an image:
You can create an image from scratch
You can also download and use ready-made images created by others.
You can also create a new mirror on an existing mirror
We can describe the contents and creation steps of the image in a text file called Dockerfile, and the Docker image can be constructed by executing the docker build command, which we will discuss later.
Docker container
The Docker container is the running instance of the Docker image.
Users can start, stop, move, or delete containers through CLI (docker) or API. It can be said that for application software, the image is the build and packaging phase of the software life cycle, while the container is the startup and running phase.
Registry
Registry is the repository for storing Docker images. Registry can be divided into private and public.
Docker Hub (https://hub.docker.com/) is the default Registry, maintained by Docker, and has tens of thousands of images that users can download and use freely.
For speed or security reasons, users can also create their own private Registry. We will learn how to build a private Registry later.
The docker pull command downloads the image from Registry.
The docker run command downloads the image (if it is not available locally) before starting the container.
The above is how to understand the Docker architecture, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.