CentOS7 Docker CE

Docker CE supports the 64-bit version of CentOS 7, and requires the kernel version to be at least 3.10. CentOS 7 meets the minimum kernel requirements, but due to the relatively low kernel version, some functions (such as overlay2 storage layer driver) cannot be used, and some functions may not be stable

Install Docker CE online

1. Uninstall the old version

$ yum remove docker \
    docker-client \
    docker-client-latest \
    docker-common \
    docker-latest \
    docker-latest-logrotate \
    docker-logrotate \
    docker-selinux \
    docker-engine-selinux \
    docker-engine

2. Install dependent packages

$ yum install -y yum-utils device-mapper-persistent-data lvm2

3. Configure domestic sources

# Alibaba
$ yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

# 中科大源

$ #yum-config-manager --add-repo https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo

# Official source

$ #yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

4. Execute YUM to install Docker CE

#Update local yum package cache
$ yum makecache fast
#Install the latest version of docker ce
$ yum install docker-ce
#Install the specified version of docker ce, plus the specified version number
$ #yum install docker-ce-18.03.0.ce

5. Configure self-startup after booting

$ systemctl enable docker
$ systemctl start docker

6. Configure the domestic mirror source

$ vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://mirror.ccs.tencentyun.com","http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu. cn"]
}

$ systemctl daemon-reload
$ systemctl restart docker
Likes(0)

Comment list count 0 Comments

No Comments