docker / for-linux

Docker Engine for Linux
https://docs.docker.com/engine/installation/
756 stars 85 forks source link

Docker for Centos - Install Instructions Causing Conflicts #20

Closed kristiehoward closed 7 years ago

kristiehoward commented 7 years ago

https://docs.docker.com/engine/installation/linux/centos/#install-using-the-repository

Expected behavior

No error with sudo yum install docker-ce

Actual behavior

[docker@swarm-test-centos7002-E2E-50D1D7-linux-1 ~]$ sudo yum install docker-ce
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.sesp.northwestern.edu
 * extras: mirror.web-ster.com
 * updates: mirror.web-ster.com
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:17.06.0.ce-0.3.rc3.el7.centos will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-17.06.0.ce-0.3.rc3.el7.centos.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.12-2.gite7096ce.el7 will be installed
--> Processing Conflict: docker-engine-selinux-1.13.1.cs3-1.el7.centos.noarch conflicts docker-selinux
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package docker-ce-selinux.noarch 0:17.05.0.ce-0.3.rc3.el7.centos will be obsoleting
---> Package docker-engine-selinux.noarch 0:1.13.1.cs3-1.el7.centos will be obsoleted
--> Processing Conflict: docker-ce-selinux-17.05.0.ce-0.3.rc3.el7.centos.noarch conflicts docker-selinux
--> Finished Dependency Resolution
Error: docker-ce-selinux conflicts with 2:container-selinux-2.12-2.gite7096ce.el7.noarch
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Information

[docker@swarm-test-centos7002-E2E-50D1D7-linux-1 ~]$ sudo yum list | grep docker-ce
docker-ce.x86_64                         17.06.0.ce-0.3.rc3.el7.centos docker-ce-test
docker-ce-selinux.noarch                 17.05.0.ce-0.3.rc3.el7.centos docker-ce-test
[docker@swarm-test-centos7002-E2E-50D1D7-linux-1 ~]$ uname -a
Linux swarm-test-centos7002-E2E-50D1D7-linux-1 3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[docker@swarm-test-centos7002-E2E-50D1D7-linux-1 ~]$ cat /etc/*release
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)

Steps to reproduce the behavior

Follow instructions to install docker on centos 7

https://docs.docker.com/engine/installation/linux/centos/#install-using-the-repository

f3rdy commented 7 years ago

Just to confirm a solution here for me: You really just need to ensure, that on your rhel7 system the rhel-7-server-extras-rpms is enabled. I for myself had to manually add a proxy location of the repository due to company policy which finally made container-selinux dependency accessible for docker-ce 17.06. Thanks to the guys here pointing that out.

rafaelmbs commented 7 years ago

For me, RHEL 7.4 workstation works with the folllowing command:

subscription-manager repos --enable=rhel-7-workstation-extras-rpms

rishibamba commented 7 years ago

Breaking on 17.09 ce too.

govindkailas commented 7 years ago

Yes, while installing 17.09-ce Error: Package: docker-ce-17.09.0.ce-1.el7.centos.x86_64 (docker-ce-stable) Requires: container-selinux >= 2.9 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

govindkailas commented 7 years ago

Some one suggested sudo yum-config-manager --enable extras , but that did not fix the issue

teyushen commented 7 years ago

I have same problem.

sudo yum install ftp://fr2.rpmfind.net/linux/centos/7.3.1611/extras/x86_64/Packages/container-selinux-2.9-4.el7.noarch.rpm solved it for me

mdlinville commented 7 years ago

This solution has already been documented for almost two months. There is no need to keep adding +1 to it.

gradhakrishnan commented 7 years ago

ftp://ftp.icm.edu.pl/vol/rzm6/linux-centos-vault/7.3.1611/extras/x86_64/Packages/container-selinux-2.9-4.el7.noarch.rpm yum -y install docker-ce

Resolves the issue

mdlinville commented 6 years ago

Once again, the Docs were already updated on September 6 to address this issue. We don't need any other workarounds because the docs have been correct for more than 3 months. :)

pvarun0 commented 6 years ago

Hello,

I am installing docker CE ( using offline .rpm packages ) on my client environment.

Getting below error, any idea what is this:

[comptel_user@BDRVL-PA-DAW01 RPM Packages]$ sudo yum install --setopt=obsoletes=0 docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm docker-ce-17.06.1.ce-1.el7.centos.x86_64.rpm --skip-broken Loaded plugins: product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Examining docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm: docker-ce-17.06.0.ce-1.el7.centos.x86_64 Marking docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm to be installed Examining docker-ce-17.06.1.ce-1.el7.centos.x86_64.rpm: docker-ce-17.06.1.ce-1.el7.centos.x86_64 Marking docker-ce-17.06.1.ce-1.el7.centos.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package docker-ce.x86_64 0:17.06.0.ce-1.el7.centos will be installed --> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 --> Processing Dependency: libdevmapper.so.1.02(DM_1_02_97)(64bit) for package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 --> Processing Dependency: libsystemd.so.0(LIBSYSTEMD_209)(64bit) for package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 --> Processing Dependency: libsystemd.so.0()(64bit) for package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 ---> Package docker-ce.x86_64 0:17.06.1.ce-1.el7.centos will be installed --> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 --> Processing Dependency: libdevmapper.so.1.02(DM_1_02_97)(64bit) for package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 --> Processing Dependency: libsystemd.so.0(LIBSYSTEMD_209)(64bit) for package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 --> Processing Dependency: libsystemd.so.0()(64bit) for package: docker-ce-17.06.1.ce-1.el7.centos.x86_64

Packages skipped because of dependency problems: docker-ce-17.06.0.ce-1.el7.centos.x86_64 from /docker-ce-17.06.0.ce-1.el7.centos.x86_64 docker-ce-17.06.1.ce-1.el7.centos.x86_64 from /docker-ce-17.06.1.ce-1.el7.centos.x86_64

Thanks

thaJeztah commented 6 years ago
This system is not registered to Red Hat Subscription Management.
You can use subscription-manager to register.

Looks like you're attempting to install the CentOS package on a RHEL server, but don't have an active Red Hat subscription (thus yum won't be able to get updated packages).

In addition, the --setopt=obsoletes=0 was discussed above if you need to downgrade to an older version of Docker (before 17.06).

I'm locking the conversation on this issue, because the documentation was updated. If you think there is an issue with the updated installation instructions;