CentOS7 deploys version 19 of docker (simple, you can follow it)

CentOS7 deploys version 19 of docker (simple, you can follow it)

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:
  • Implementation of Centos7+Docker+Jenkins+ASP.NET Core 2.0 automated release and deployment
  • Detailed explanation of CentOS7 Docker Nginx deployment and operation
  • Docker Practice - Detailed Explanation of Deploying Kubernetes on CentOS7
  • Docker installation and deployment on CentOS7 system and basic tutorial

<<:  WeChat applet implements simple calculator function

>>:  Will this SQL writing method really cause the index to fail?

Recommend

OpenSSL implements two-way authentication tutorial (with server and client code)

1. Background 1.1 Problems A recent product testi...

Nginx tp3.2.3 404 problem solution

Recently I changed Apache to nginx. When I moved ...

Introduction to JavaScript Number and Math Objects

Table of contents 1. Number in JavaScript 2. Math...

How to use nginx as a load balancer for mysql

Note: The nginx version must be 1.9 or above. Whe...

Pycharm2017 realizes the connection between python3.6 and mysql

This article shares with you how to connect pytho...

Set an icon for the website to be displayed on the far left of the browser tab

What is the purpose of this sentence? Copy code Th...

Detailed explanation of this pointing in JS arrow function

Arrow function is a new feature in ES6. It does n...

Detailed discussion of several methods for deduplicating JavaScript arrays

Table of contents 1. Set Deduplication 2. Double ...

MySQL 8.0.15 version installation tutorial connect to Navicat.list

The pitfalls 1. Many tutorials on the Internet wr...

MySQL Basic Tutorial Part 1 MySQL5.7.18 Installation and Connection Tutorial

Starting from this article, a new series of artic...

Flex layout realizes the layout mode of upper and lower fixed and middle sliding

This article mainly introduces the layout method ...

Nginx+FastDFS to build an image server

Installation Environment Centos Environment Depen...