Check docker version and reinstall docker

Time:2022-5-9

This document describes how to check the docker version and reinstall docker to provide reference for friends in need.

Check docker version

[[email protected] ]# docker version
Client: Docker Engine – Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:27:04 2020
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine – Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:25:42 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683

View all docker versions in all warehouses and select a specific version to install

[[email protected] ]# yum list docker-ce –showduplicates | sort -r

  • updates: mirrors.aliyun.com

Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror

  • extras: mirrors.ustc.edu.cn
  • epel: hkg.mirror.rackspace.com

docker-ce.x86_64 3:19.03.8-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.7-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.6-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.5-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.4-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.3-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.2-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.1-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.0-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.9-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.8-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.7-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.6-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.5-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.4-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.3-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.2-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.3.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.2.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable
docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable

  • base: mirrors.aliyun.com

Available Packages

Reinstall docker

Install docker-ce-18.06.0 ce

[[email protected] ]# yum remove docker docker-common docker-selinux docker-engine -y
[[email protected] ]# yum install -y docker-ce-18.06.0.ce

Possible errors

file /usr/share/zsh/vendor-completions/_docker from install of docker-ce-18.06.0.ce-3.el7.x86_64 conflicts with file from package docker-ce-cli-1:19.03.8-3.el7.x86_64

Error Summary

resolvent

Uninstall docker-ce-cli-1: 19.03.8-3 el7. x86_ 64 -y

[[email protected] ]# yum erase docker-ce-cli-1:19.03.8-3.el7.x86_64 -y

Install docker-ce-18.06.0 again ce

[[email protected] ]# yum install -y docker-ce-18.06.0.ce
[[email protected] ]# systemctl start docker
[[email protected] ]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[[email protected] ]# systemctl status docker
● docker.service – Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d

       └─kolla.conf

Active: active (running) since Mon 2020-03-30 14:25:00 EDT; 24s ago

 Docs: https://docs.docker.com

Main PID: 21775 (dockerd)
CGroup: /system.slice/docker.service

       ├─21775 /usr/bin/dockerd
       └─21782 docker-containerd --config /var/run/docker/containe...

Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack dockerd[21775 ]: time=”2020-0…
Mar 30 14:25:00 openstack systemd[1 ]: Started Docker A…
Hint: Some lines were ellipsized, use -l to show in full.

View docker version information

[[email protected] ~]# docker –version
Docker version 18.06.0-ce, build 0ffa825
[[email protected] ~]# docker version
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:08:18 2018
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 18.06.0-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:10:42 2018
OS/Arch: linux/amd64
Experimental: false

summary

So far, docker-ce-18.06.0 CE installation succeeded! If you want to see the follow-up operation of docker, please continue to pay attention to my article. I hope my article can help you.

Recommended Today

Python 3 operation mongodb simple and easy to understand tutorial

PymongoyespythonAn operation ofMongodbLibrary of. Let’s briefly list some common operation commands. Connect database The linked database needs to provide an address and interface. First, import the package. from pymongo import MongoClient conn = MongoClient(‘localhost’,27017) Of course, you can use the following wording: conn = MongoClient(‘mongodb://localhost:27017/’) Create database mongodbYou do not need to create a database […]