CentOS 8.0 installs docker error

CentOS 8.0 installs docker error: Problem: package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >= 1.2.2-3

Refer to the official documentation for installation steps:
https://docs.docker.com/install/linux/docker-ce/centos/

Uninstall old version

[ root@localhost ~]# remove docker \
     docker-client \
     docker-client-latest \
     docker-common \
     docker-latest \
     docker-latest-logrotate \
     docker-logrotate \
     docker-engine

Install community version of Docker Engine

[ root@localhost ~]# yum install -y yum-utils \
 device-mapper-persistent-data \
 lvm2
[ root@localhost ~]# sudo yum-config-manager \
 - - add-repo \
 https://download.docker.com/linux/centos/docker-ce.repo
[ root@localhost ~]# yum-config-manager --enable docker-ce-nightlyyum-config-manager --enable docker-ce-test
[ root@localhost ~]# yum-config-manager --enable docker-ce-test
[ root@localhost ~]# yum-config-manager --disable docker-ce-nightly
[ root@localhost ~]# yum install docker-ce docker-ce-cli containerd.io
# Install this step error

Error content

[ root@localhost yum.repos.d]# yum install docker-ce docker-ce-cli containerd.io
Last metadata expiration check:0:04:46 ago on Mon 16 Mar 202003:40:11 PM CST.
Package containerd.io-1.2.0-3.el7.x86_64 is already installed.
Error:
 Problem:package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >=1.2.2-3, but none of the providers can be installed
 - cannot install the best candidate for the job
 - package containerd.io-1.2.10-3.2.el7.x86_64 is excluded
 - package containerd.io-1.2.13-3.1.el7.x86_64 is excluded
 - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded
 - package containerd.io-1.2.2-3.el7.x86_64 is excluded
 - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded
 - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded
 - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded
 - package containerd.io-1.2.11-3.2.el7.x86_64 is excluded
 - package containerd.io-1.2.12-3.1.el7.x86_64 is excluded
 - package containerd.io-1.2.6-3.2.el7.x86_64 is excluded(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Analyze the reasons
Looking at the above content, it is said that containerd.io >= 1.2.2-3, which means that the version of containerd.io must be greater than or equal to 1.2.2-3

solve
1、 Either lower the version of docker
2、 If you don’t want to lower the docker version, then update the version of containerd.io

[ root@localhost ~]# yum install -y wget
[ root@localhost ~]# wget https://download.docker.com/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
[ root@localhost ~]# yum install -y  containerd.io-1.2.6-3.3.el7.x86_64.rpm
[ root@localhost ~]# yum install docker-ce docker-ce-cli

Start docker

[ root@localhost ~]# systemctl start docker

Check if the installation is successful

1、 Check the version number

[ root@localhost ~]# docker -v
Docker version 19.03.8, build afacb8b

2、 Run the hello-world container

[ root@localhost ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1 b930d010525: Pull complete
Digest: sha256:f9dfddf63636d84ef479d645ab5885156ae030f611a56f3a7ac7f2fdd86d7e4e
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a newcontainerfrom that image which runs the
 executable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent it
 to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

3、 Run the tomcat container and map the port number

[ root@localhost etc]# docker pull tomcat
Using default tag: latest
latest: Pulling from library/tomcat
50 e431f79093: Pull complete
dd8c6d374ea5: Pull complete
c85513200d84: Pull complete
55769680 e827: Pull complete
e27ce2095ec2: Pull complete
5943 eea6cb7c: Pull complete
3 ed8ceae72a6: Pull complete
91 d1e510d72b: Pull complete
98 ce65c663bc: Pull complete
27 d4ac9d012a: Pull complete
Digest: sha256:2c90303e910d7d5323935b6dc4f8ba59cc1ec99cf1b71fd6ca5158835cffdc9c
Status: Downloaded newer image for tomcat:latest
docker.io/library/tomcat:latest
[ root@localhost etc]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
tomcat              latest              4e7840b49fad        2 weeks ago         529MB
hello-world         latest              fce289e99eb9        14 months ago       1.84kB
[ root@localhost etc]# docker run -it -p 8888:8080 tomcat
Using CATALINA_BASE:/usr/local/tomcat
Using CATALINA_HOME:/usr/local/tomcat
Using CATALINA_TMPDIR:/usr/local/tomcat/temp
Using JRE_HOME:/usr/local/openjdk-8
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
16- Mar-202009:22:23.444 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.5116-Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Feb 5202022:26:25 UTC
16- Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number:8.5.51.016-Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
16- Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:4.18.0-80.el8.x86_64
16- Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
16- Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:/usr/local/openjdk-8/jre
16- Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:1.8.0_242-b08
16- Mar-202009:22:23.445 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:/usr/local/tomcat
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:/usr/local/tomcat
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Djdk.tls.ephemeralDHKeySize=204816-Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Djava.protocol.handler.pkgs=org.apache.catalina.webresources
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Dorg.apache.catalina.security.SecurityListener.UMASK=002716-Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Dignore.endorsed.dirs=16-Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Dcatalina.base=/usr/local/tomcat
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Dcatalina.home=/usr/local/tomcat
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument:-Djava.io.tmpdir=/usr/local/tomcat/temp
16- Mar-202009:22:23.446 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.5].16-Mar-202009:22:23.446 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].16-Mar-202009:22:23.446 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]16-Mar-202009:22:23.454 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1d  10 Sep 2019]16-Mar-202009:22:23.520 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]16-Mar-202009:22:23.533 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16- Mar-202009:22:23.552 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in367 ms
16- Mar-202009:22:23.584 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]16-Mar-202009:22:23.584 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.5116-Mar-202009:22:23.595 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]16-Mar-202009:22:23.611 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in58 ms

THE

END

Recommended Posts

CentOS 8.0 installs docker error
CentOS 7 install Docker
CentOS7 install Docker
Docker installation (CentOS7 installation)
Centos7 install Docker
Centos7 install docker18
centos7 install docker
CentOS7 docker installation
CentOS 6 install Docker
Centos8 install Docker
Install Docker on Centos7
CentOS 7 install Docker service
CentOS 8-dnf install docker
install Docker on centos6.5
Docker CentOS installation method
CentOS 7 install Docker CE
Centos7 docker installation details
Build docker environment under Centos6.5
Install docker transfer on Centos7
Install docker on Centos system
CentOS environment installation of Docker
Docker EE installation on centos7
CentOS 6 automatically installs RabbitMQ script
CentOS 8 (2)
Install MySql with Docker in CentOS7
Centos7 modify Docker default storage location
Docker centos7 Chinese chaos problem solution
Container study notes CentOS7 install Docker
CentOS 8 (1)
Build Elasticsearch 6.2.4 (centos) based on docker
Install and use docker under CentOS 6.8
Install Centos7 operating system in Docker
CentOS7 installs IT asset management system Snipe-IT
Create CentOS Docker image with httpd service
CentOS container installation in Docker uses MySQL
Use supermin to make CentOS Docker image
Deploy Docker and configure Nginx in CentOS
Install CentOS7 virtual machine, configure docker suite
Error compiling mariadbpp with cmake under centOS7
[Centos8] The bumpy process of installing docker
Install Docker CE in yum under CentOS 7