Installing specific or old version of Docker on Centos8\REDHAT or later versions:
If docker is running first stop it so we don't have corrupted files later
sudo systemctl stop docker
Then Remove the previously installed version of Docker
sudo yum remove -y docker-ce docker-ce-cli
Now list the available Docker Engine versions in the repo
[cloud_user@info2c ~]$ yum list docker-ce --showduplicates | sort -r
docker-ce.x86_64 3:20.10.2-3.el8 docker-ce-stable
docker-ce.x86_64 3:20.10.1-3.el8 docker-ce-stable
docker-ce.x86_64 3:20.10.0-3.el8 docker-ce-stable
docker-ce.x86_64 3:19.03.14-3.el8 docker-ce-stable
docker-ce.x86_64 3:19.03.13-3.el8 docker-ce-stable
To install specific version here is command
$ sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io
In our case command would be like this
[cloud_user@info2c ~]$ sudo yum install docker-ce-3:19.03.13-3.el8 docker-ce-cli-3:19.03.13-3.el8
[sudo] password for cloud_user:
Last metadata expiration check: 0:09:37 ago on Sat 23 Jan 2021 05:18:06 PM UTC.
Dependencies resolved.
================================================================================================================================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================================================================================================================================
Installing:
docker-ce x86_64 3:19.03.13-3.el8 docker-ce-stable 24 M
Installing dependencies:
docker-ce-cli x86_64 1:20.10.2-3.el8 docker-ce-stable 33 M
libcgroup x86_64 0.41-19.el8 baseos 70 k
Transaction Summary
================================================================================================================================================================================================================================================
Install 3 Packages
docker-storage-setup
command is part of the Red Hat (/CentOS/Fedora) package, not part of the upstream source, so you'll only get that if you install a package from your distribution. This is also true fordocker-fetch
. – larsks