Detailed explanation of configuring Docker's yum source and installing it in CentOS7

Detailed explanation of configuring Docker's yum source and installing it in CentOS7

CentOS7 is used here, and the kernel version is

[root@localhost ~]# uname -r
3.10.0-327.el7.x86_64

In this version, the source of yum is configured as Alibaba's mirror source. For specific configuration methods, see Alibaba mirror source configuration method

To facilitate the installation and upgrade of Docker, configure the Docker yum source according to the official Docker documentation. For details, see CentOS docker yum source configuration method https://docs.docker.com/v1.13/engine/installation/linux/centos/

After configuring the yum source, you can use the yum list command to get the installable docker version

[root@localhost ~]# yum list docker --showduplicates |sort -r
 * updates: mirrors.aliyun.com
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror, priorities
 * extras: mirrors.aliyun.com
 * epel: mirrors.aliyun.com
docker.x86_64 2:1.12.6-28.git1398f24.el7.centos extras
docker.x86_64 2:1.12.6-16.el7.centos extras
docker.x86_64 2:1.12.6-11.el7.centos extras
docker.x86_64 2:1.12.5-14.el7.centos extras
docker.x86_64 2:1.10.3-59.el7.centos extras
 * base: mirrors.aliyun.com
Available Packages
[root@localhost ~]# yum list docker-engine.x86_64 --showduplicates |sort -r
 * updates: mirrors.aliyun.com
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror, priorities
Installed Packages
 * extras: mirrors.aliyun.com
 * epel: mirrors.aliyun.com
docker-engine.x86_64 1.9.1-1.el7.centos docker-main 
docker-engine.x86_64 1.9.0-1.el7.centos docker-main 
docker-engine.x86_64 1.8.3-1.el7.centos docker-main 
docker-engine.x86_64 1.8.2-1.el7.centos docker-main 
docker-engine.x86_64 1.8.1-1.el7.centos docker-main 
docker-engine.x86_64 1.8.0-1.el7.centos docker-main 
docker-engine.x86_64 1.7.1-1.el7.centos docker-main 
docker-engine.x86_64 17.05.0.ce-1.el7.centos docker-main 
docker-engine.x86_64 17.04.0.ce-1.el7.centos docker-main 
docker-engine.x86_64 17.03.1.ce-1.el7.centos docker-main 
docker-engine.x86_64 17.03.0.ce-1.el7.centos docker-main 
docker-engine.x86_64 1.7.0-1.el7.centos docker-main 
docker-engine.x86_64 1.13.1-1.el7.centos docker-main 
docker-engine.x86_64 1.13.1-1.el7.centos@docker-main
docker-engine.x86_64 1.13.0-1.el7.centos docker-main 
docker-engine.x86_64 1.12.6-1.el7.centos docker-main 
docker-engine.x86_64 1.12.5-1.el7.centos docker-main 
docker-engine.x86_64 1.12.4-1.el7.centos docker-main 
docker-engine.x86_64 1.12.3-1.el7.centos docker-main 
docker-engine.x86_64 1.12.2-1.el7.centos docker-main 
docker-engine.x86_64 1.12.1-1.el7.centos docker-main 
docker-engine.x86_64 1.12.0-1.el7.centos docker-main 
docker-engine.x86_64 1.11.2-1.el7.centos docker-main 
docker-engine.x86_64 1.11.1-1.el7.centos docker-main 
docker-engine.x86_64 1.11.0-1.el7.centos docker-main 
docker-engine.x86_64 1.10.3-1.el7.centos docker-main 
docker-engine.x86_64 1.10.2-1.el7.centos docker-main 
docker-engine.x86_64 1.10.1-1.el7.centos docker-main 
docker-engine.x86_64 1.10.0-1.el7.centos docker-main 
 * base: mirrors.aliyun.com
Available Packages

From the above two paragraphs, we can see that the name of the Docker installation package in the Alibaba Cloud image source is different from the name of the installation package provided by Docker officially. Therefore, when using yum to install, it is very likely that only the first paragraph result will be found. Although the official Docker source is configured, the latest Docker version cannot be searched. It should be noted here that if you want to upgrade Docker using the installation package in the official Docker source, you need to provide the name of the installation package as docker-engine, so that you can find various versions of Docker.

Select version v1.13 for installation here.

If you have installed Docker before (generally using the installation package in the CentOS source), be sure to delete the old version. Because I installed version v1.12 before, version v1.13 has many changes compared to the previous one. If it is not deleted, unexpected problems may arise.

Delete the v1.12 version of docker

In addition to its own docker package, this version of docker has two dependent packages, docker-common and container-linux, which need to be deleted.

[root@localhost ~]# yum erase docker
[root@localhost ~]# yum erase docker-common
[root@localhost ~]# yum erase container-selinux

or

[root@localhost ~]# yum remove docker
[root@localhost ~]# yum remove docker-common
[root@localhost ~]# yum remove container-selinux

Finally install the v1.13 version of docker

[root@localhost ~]# yum -y install docker-engine-1.13.1

Start Docker and set it to start automatically at boot

[root@localhost ~]# systemctl start docker
[root@localhost ~]# systemctl enable docker

You can view the current docker version through the command

[root@localhost ~]# docker version
Client:
 Version: 1.13.1
 API version: 1.26
 Go version: go1.7.5
 Git commit: 092cba3
 Built: Wed Feb 8 06:38:28 2017
 OS/Arch: linux/amd64

Server:
 Version: 1.13.1
 API version: 1.26 (minimum version 1.12)
 Go version: go1.7.5
 Git commit: 092cba3
 Built: Wed Feb 8 06:38:28 2017
 OS/Arch: linux/amd64
 Experimental: false

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:
  • Detailed steps to install Docker on CentOS7
  • How to install Docker on CentOS
  • Install Docker on CentOS 7
  • Detailed tutorial on installing Docker on CentOS 8
  • Detailed tutorial on installing Docker on CentOS 8.4
  • The most detailed method to install docker on CentOS 8
  • About the problem of offline installation of Docker package on CentOS 8.4
  • Install Docker on Centos7 (2020 latest version available, just copy and paste)
  • How to install Docker using scripts under Linux Centos
  • Detailed tutorial on installing Docker on CentOS 7.5
  • Install a specific version of Docker for CentOS

<<:  Detailed explanation of MySQL installation and new password authentication method in MySQL 8.0

>>:  Detailed explanation of Angular dynamic components

Recommend

Vue+echart realizes double column chart

This article shares the specific code of vue+echa...

Detailed instructions for installing mysql5.7 database under centos7.2

The mysql on the server is installed with version...

Common considerations for building a Hadoop 3.2.0 cluster

One port changes In version 3.2.0, the namenode p...

Why TypeScript's Enum is problematic

Table of contents What happened? When to use Cont...

Detailed explanation of the correct use of the count function in MySQL

1. Description In MySQL, when we need to get the ...

Introduction to the properties of B-Tree

B-tree is a common data structure. Along with him...

How to manually encapsulate paging components in Vue3.0

This article shares the specific code of the vue3...

A brief introduction to MySQL dialect

Putting aside databases, what is dialect in life?...

How to manage docker through UI

Docker is being used in more and more scenarios. ...

Docker-compose installation db2 database operation

It is troublesome to install the db2 database dir...