I’m trying to install a specific version of Docker CE, the 20.10.5, to do this I list the versions available with this command:
yum list docker-ce-cli --showduplicates | sort -r
This is the output:
docker-ce-cli.x86_64 1:20.10.6-3.el7 docker-ce-stable
docker-ce-cli.x86_64 1:20.10.5-3.el7 docker-ce-stable
docker-ce-cli.x86_64 1:20.10.4-3.el7 docker-ce-stable
docker-ce-cli.x86_64 1:20.10.3-3.el7 docker-ce-stable
then I specify the version in the installation:
sudo yum install docker-ce-20.10.5-3.el7
But when I run docker --version
I still get the 20.10.6 version:
Docker version 20.10.6, build 370c289
What I’m doing wrong?
2
Answers
From your questions looks like you already running docker version. please try this:
1- have you already running the any higher docker version? if yes please uninstall it through yum and then install docker CE version( which you want to install).
2- if above mentioned does not work then i prefer to install it directly rather than yum repo.
You are listing the
docker-ce-cli
packages, but then installingdocker-ce
. You’ll probably want to install both (and possibly thecontainerd.io
as well). See https://docs.docker.com/engine/install/centos/#install-using-the-repositoryWhen checking the version, you can also do
docker version
instead ofdocker --version
which will show both the Client and Engine versions, as well as some additional info.