1. Install dependency packages [root@localhost ~]# yum install -y yum-utils device-mapper-persistent-data lvm2 2. Set up the Alibaba Cloud image source [root@localhost ~]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 3. Install Docker-CE [root@localhost ~]# yum install -y docker-ce 4. Turn off firewall and enhanced security features [root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# setenforce 0 [root@localhost ~]# 5. Enable the service and set it to start automatically at boot [root@localhost ~]# systemctl start docker.service [root@localhost ~]# systemctl enable docker.service Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. [root@localhost ~]# 6. Set up Alibaba Cloud image acceleration (1) Go to the Alibaba Cloud homepage and select Login. If you don’t have an account, you can register one. (2) After successful login, select the console (3) Select products and services, then select container image service (4) Select the mirror accelerator at the bottom. At this time, you can provide the corresponding accelerator address according to your system. Everyone has their own accelerator address. (5) Configuring image acceleration [root@localhost ~]# cd /etc/docker/ ##If this directory does not exist, you need to create it manually [root@localhost docker]# ls key.json [root@localhost docker]# tee /etc/docker/daemon.json <<-'EOF' ##Configure image acceleration> { > "registry-mirrors": ["https://******.******.aliyuncs.com"] > } > EOF { "registry-mirrors": ["https://******.*******.aliyuncs.com"] } [root@localhost docker]# ls daemon.json key.json [root@localhost docker]# systemctl daemon-reload ##Reload the daemon process [root@localhost docker]# systemctl restart docker ##Restart docker [root@localhost docker]# 7. Enable the system's packet forwarding function [root@localhost docker]# echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf [root@localhost docker]# sysctl -p ##Load configuration net.ipv4.ip_forward = 1 [root@localhost docker]# The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: WeChat applet implements simple calculator function
>>: Will this SQL writing method really cause the index to fail?
1. Background 1.1 Problems A recent product testi...
Recently I changed Apache to nginx. When I moved ...
Table of contents 1. Number in JavaScript 2. Math...
Nginx supports three ways to configure virtual ho...
Note: The nginx version must be 1.9 or above. Whe...
This article shares with you how to connect pytho...
What is the purpose of this sentence? Copy code Th...
Arrow function is a new feature in ES6. It does n...
Anyone in need can refer to it. If you have tried...
Phenomenon: After MySQL version 5.7, the default ...
Table of contents 1. Set Deduplication 2. Double ...
The pitfalls 1. Many tutorials on the Internet wr...
Starting from this article, a new series of artic...
This article mainly introduces the layout method ...
Installation Environment Centos Environment Depen...