Docker installation (under CentOS7)

Concept : Docker is an open source application container engine, based on the Go language and open source under the Apache2.0 protocol. Docker allows developers to package their applications and dependencies into a lightweight, portable container, which can then be distributed to any popular Linux machine, and can also be virtualized. The container completely uses the sandbox mechanism, and there will not be any interface between each other (similar to the iPhone app), and more importantly, the performance overhead of the container is extremely low.


Install with yum

(Under CentOS7) Docker requires CentOS system kernel version higher than 3.10, check the prerequisites on this page to verify if your CentOS version supports Docker. Check your current kernel version with the uname -r command


Install Docker 1. The Docker
package and dependencies are already included in the default CentOS-Extras software source. The installation command is as follows:

  yum -y install docker

2. Installation is complete

3. Start Docker
 
(1) Start the command
  systemctl start docker (2) View the status   systemctl status docker   (3) View the version   docker version  (4) View the docker information   docker info Note : In view of domestic network problems, subsequent pulling of Docker images is very slow. We can configure the accelerator to solve the problem. Here we introduce how to use Alibaba Cloud's exclusive accelerator to speed up the acquisition of the official Docker image. The steps are as follows: 1. First, you need to have an Aliyun account. If you don't have it, you can register for an Aliyun development account: https://dev.aliyun.com/ 2. Enter the accelerator page: https://cr.console.aliyun.com/#/ accelerator 3. Get your dedicated accelerator address 4. You can use the accelerator by modifying the daemon configuration file /etc/docker/daemon.json: sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json << -'EOF' {   "registry-mirrors": ["https://ai0849gl.mirror.aliyuncs.com"] } EOF
 






















sudo systemctl daemon-reload
sudo systemctl restart docker

Reference: https://blog.csdn.net/jiangshouzhuang/article/details/53748631



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325922420&siteId=291194637