I’ve been trying to downgrade docker from 19.03.2 to 18.09.9 on CentOS 7. I installed it via yum.
This is what I’ve tried so far.
Only a single version available returned.
$ yum list docker-ce.x86_64 --showduplicates | sort -r
* updates: centos4.zswap.net
Loading mirror speeds from cached hostfile
Loaded plugins: fastestmirror
Installed Packages
* extras: mirrors.usinternet.com
* epel: d2lzkl7pfhq30w.cloudfront.net
docker-ce.x86_64 3:19.03.2-3.el7 . @docker-ce-stable
* base: centos4.zswap.net
No luck on this, duh!
$ yum downgrade docker-ce.x86_64 3:18.09.9-3.el7
Tried to downgrade it with downloaded rpm packages. No luck either.
$ yum downgrade file docker-ce-cli-18.09.9-3.el7.x86_64.rpm
$ yum downgrade file docker-ce-18.09.9-3.el7.x86_64.rpm
Finally, the docker engine command ran successfully, but now there are two different versions, APIs are the same though.
$ docker engine update --version 18.09.9
Two different docker versions.
$ docker version
Client: Docker Engine - Community
Version: 19.03.2
API version: 1.39 (downgraded from 1.40)
Go version: go1.12.8
Git commit: 6a30dfc
Built: Thu Aug 29 05:28:55 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.9
API version: 1.39 (minimum version 1.12)
Go version: go1.11.13
Git commit: 039a7df
Built: Wed Sep 4 16:22:32 2019
OS/Arch: linux/amd64
Experimental: false
How do I downgrade the client now?
2
Answers
Let’s say if I want to downgrade my own
Client: Docker Engine - Community
from 19.03.2 to 18.09.9.And below is the list of available versions.
I can achieve this by executing the following command.
for i in {1..3}; do yum downgrade docker-ce-cli -y; done
To downgrade your docker-ce version you need to tap this cmd :