无法在RHEL 8上安装Docker

时间:2019-09-20 11:11:38

标签: docker

我想在rhel 8上安装docker。

我收到以下错误,不确定为什么需要帮助。

[root@mano mano]# yum install docker-ce-18.09.9
Cannot find a valid baseurl for repo: InstallMedia, ignoring this repo.
Last metadata expiration check: 0:11:14 ago on Fri 20 Sep 2019 02:42:53 PM IST.
Error: 
 Problem: package docker-ce-3:18.09.9-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.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.2.el7.x86_64 is excluded
  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

我已经安装了containered.io

2 个答案:

答案 0 :(得分:0)

对于Rhel 8,请尝试以下步骤:

首先,安装DNF:

yum install DNF
dnf install -y dnf-utils \
  device-mapper-persistent-data \
  lvm2
dnf config-manager \ 
  --add-repo \
  https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce
systemctl start docker
systemctl enable docker

在安装过程中,如果提示您接受GPG密钥,请输入y接受

答案 1 :(得分:0)

RHEL由于某种原因阻止了Containerd

您必须通过运行以下命令行手动安装它;

yum -y install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

之后,yum install docker-ce应该可以正常工作。

请注意,您必须还禁用firewalld,否则DNS断开。

为此,您可以运行:

systemctl disable firewalld