Docker.github.io: Installation on CentOS 7 is broken by moby packages

Created on 30 Jul 2020  路  4Comments  路  Source: docker/docker.github.io

As posted on stackoverflow

I have a docker image for CentOS 7 which installs docker-ce via the recommended instructions. i.e.

RUN yum-config-manager \
  --add-repo \
  https://download.docker.com/linux/centos/docker-ce.repo
RUN yum install -y yum-utils \
  device-mapper-persistent-data \
 lvm2
RUN yum update -y
RUN yum install -y docker-ce docker-ce-cli containerd.io

Recently this stopped working and now fails as follows:

--> Processing Conflict: moby-containerd-1.3.6+azure-1.x86_64 conflicts containerd
--> Processing Conflict: moby-runc-1.0.0~rc10+azure-2.x86_64 conflicts runc
--> Finished Dependency Resolution
Error: moby-containerd conflicts with containerd.io-1.2.13-3.2.el7.x86_64
Error: moby-runc conflicts with containerd.io-1.2.13-3.2.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
The command '/bin/sh -c yum install -y docker-ce docker-ce-cli containerd.io' returned a non-zero code: 1

If the install command is replaced with:

 yum install -y docker

I get a different error to do with an unsigned package:

Package runc is obsoleted by moby-runc, trying to install moby-runc-1.0.0~rc10+azure-2.x86_64 instead
...
Package moby-runc-1.0.0~rc10+azure-2.x86_64.rpm is not signed

I tried forcing use of a few old versions as below to no avail e.g.

RUN yum install -y docker-1.13.1-102.git7f2769b.el7.centos

As a workaround I have to exclude moby packages. As in:

RUN yum install -y docker --exclude=moby-\*

I think this is a defect in the repository however.
I don't think an unsigned package belongs in a repository named "stable".
I guess there is something wrong with how the existing packages are being obsoleted too.

The installation instructions (engine/install/centos.md) may need to be reviewed with this.

Most helpful comment

my mistake. This is not a bug in the docker repo at all, which I did find surprising. Its Azure's fault. Its Microsoft who've been mismanaging their repos. The moby packages come from "packages-microsoft-com-prod".

For completeness and anyone who encounters this issue and winds up here it seems the baseurl has changed.
The correct one is now:

baseurl=https://packages.microsoft.com/rhel/7/prod/

installed via:

RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo >/etc/yum.repos.d/microsoft-prod.repo

The one with the dodgy packages is:

baseurl=https://packages.microsoft.com/centos/7/prod/

Installed via:

RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

The moby packages exist only in the CentOS repo which is possibly defunct, as Microsoft themselves have changed installation documentation in various places.

All 4 comments

This is affecting me as well --- I am using a Centos 7 on an Azure VM (OS Version: Linux (centos 7.8.2003)) -- I am using the the exclude workaround for the time being as well. It was stopping up an apt update.

Update --- my repo's needed to be updated --- the following resolved me:

curl https://packages.microsoft.com/config/rhel/7/prod.repo > ./microsoft-prod.repo
sudo cp ./microsoft-prod.repo /etc/yum.repos.d/
yum update -y

https://docs.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software

my mistake. This is not a bug in the docker repo at all, which I did find surprising. Its Azure's fault. Its Microsoft who've been mismanaging their repos. The moby packages come from "packages-microsoft-com-prod".

For completeness and anyone who encounters this issue and winds up here it seems the baseurl has changed.
The correct one is now:

baseurl=https://packages.microsoft.com/rhel/7/prod/

installed via:

RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo >/etc/yum.repos.d/microsoft-prod.repo

The one with the dodgy packages is:

baseurl=https://packages.microsoft.com/centos/7/prod/

Installed via:

RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

The moby packages exist only in the CentOS repo which is possibly defunct, as Microsoft themselves have changed installation documentation in various places.

Thanks was having a similar issue automating some vm builds

Was this page helpful?
0 / 5 - 0 ratings