docker / for-linux

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

Docker for Centos - Install Instructions Causing Conflicts #20

Closed kristiehoward closed 6 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

kristiehoward commented 7 years ago

Update: running sudo yum erase docker-engine-selinux fixed the issue.... but I don't know why the issue exists in the first place 😅

kristiehoward commented 7 years ago

(and i had this issue on all 4 machines)

kristiehoward commented 7 years ago

And I did run the Uninstall instructions before just to make sure, which said there was nothing to remove:

sudo yum remove docker \
                  docker-common \
                  container-selinux \
                  docker-selinux \
                  docker-engine
cpuguy83 commented 7 years ago

This is because previously we reliaed on docker-selinux (or docker-ce-selinux) and have moved to container-selinux. We'll need to update the docs.

I'll check if there's something we can do in the RPM spec.

cpuguy83 commented 7 years ago

Maybe we need to Obsoletes: docker-ce-selinux?

@andrewhsu

terminatorheart commented 7 years ago

the same problem when install in a pure centos7.2 system which has never installed old docker version, out put as follows:

Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:17.03.2.ce-1.el7.centos will be installed
--> Processing Dependency: docker-ce-selinux >= 17.03.2.ce-1.el7.centos for package: docker-ce-17.03.2.ce-1.el7.centos.x86_64
Package docker-ce-selinux is obsoleted by docker-ce, but obsoleting package does not provide for requirements
--> Processing Dependency: libcgroup for package: docker-ce-17.03.2.ce-1.el7.centos.x86_64
--> Processing Dependency: libseccomp.so.2()(64bit) for package: docker-ce-17.03.2.ce-1.el7.centos.x86_64
--> Processing Dependency: libltdl.so.7()(64bit) for package: docker-ce-17.03.2.ce-1.el7.centos.x86_64
--> Running transaction check
---> Package docker-ce.x86_64 0:17.03.2.ce-1.el7.centos will be installed
--> Processing Dependency: docker-ce-selinux >= 17.03.2.ce-1.el7.centos for package: docker-ce-17.03.2.ce-1.el7.centos.x86_64
Package docker-ce-selinux is obsoleted by docker-ce, but obsoleting package does not provide for requirements
---> Package libcgroup.x86_64 0:0.41-11.el7 will be installed
---> Package libseccomp.x86_64 0:2.3.1-2.el7 will be installed
---> Package libtool-ltdl.x86_64 0:2.4.2-22.el7_3 will be installed
--> Finished Dependency Resolution
Error: Package: docker-ce-17.03.2.ce-1.el7.centos.x86_64 (docker-ce-stable)
           Requires: docker-ce-selinux >= 17.03.2.ce-1.el7.centos
           Available: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch (docker-ce-stable)
               docker-ce-selinux = 17.03.0.ce-1.el7.centos
           Available: docker-ce-selinux-17.03.1.ce-1.el7.centos.noarch (docker-ce-stable)
               docker-ce-selinux = 17.03.1.ce-1.el7.centos
           Available: docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch (docker-ce-stable)
               docker-ce-selinux = 17.03.2.ce-1.el7.centos
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

and neither rpm -Va --nofiles --nodigest nor yum install docker-ce-17.03.2.ce-1.el7.centos --skip-broken luck at all

terminatorheart commented 7 years ago

and docker-ce-17.06.0.ce-1.el7.centos can be installed successfully. how ever, rancher not support this version right now

prakashriti commented 7 years ago

Installed 17.03.0.ce-1.el7.centos last month and everything worked perfectly. Now the same installation process is throwing the above mentioned error. if i install the latest version of docker-ce, everything seems to be working. I want to install docker in a machine and connect the container to a overlay network. So i would prefer to install 17.03.0.ce-1.el7.centos and maintain same version in all the machines under overlay network. Is it any workaround to get rid of this dependency issue. I am using centos 7 and need to install docker 17.03.0. Thanks in advance

andrewhsu commented 7 years ago

For the initial cause this issue was filed, the docker-ce 17.06.0 packages can now install properly on centos 7.

@terminatorheart for your specific situation of installing docker-ce 17.03.2, you'll need to peg the version specifically and pass a setopt flag to ignore the Obsoletes that was introduced with docker-ce 17.06.0 just to get the older 17.03.2 package installed:

$ yum install --setopt=obsoletes=0 \
   docker-ce-17.03.2.ce-1.el7.centos.x86_64 \
   docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch # on a new system with yum repo defined, forcing older version and ignoring obsoletes introduced by 17.06.0
terminatorheart commented 7 years ago

@andrewhsu nice, it worked well. that's so kind of you! if the doc here https://docs.docker.com/engine/installation/linux/docker-ce/centos/ updated will be of great helpful

@prakashriti i think you meet the same problem of mine. and please just follow andrewhsu's solution

f3rdy commented 7 years ago

I'm running docker-ce on rhel 7.3 and this is what I got recently when updating.

Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:17.03.2.ce-1.el7.centos will be updated
---> Package docker-ce.x86_64 0:17.06.0.ce-1.el7.centos will be obsoleting
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-17.06.0.ce-1.el7.centos.x86_64
---> Package docker-ce-selinux.noarch 0:17.05.0.ce-1.el7.centos will be obsoleted
--> Finished Dependency Resolution
Error: Package: docker-ce-17.06.0.ce-1.el7.centos.x86_64 (docker-ce-edge)
           Requires: container-selinux >= 2.9
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
dove-young commented 7 years ago

I've found same issue as @f3rdy on RHEL 7.3

@andrewhsu 's method works for me

[root@cfc-k8s-1-2-3 ~]# yum install --setopt=obsoletes=0 \
>    docker-ce-17.03.2.ce-1.el7.centos.x86_64 \
>    docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is not registered with RHN Classic or Red Hat Satellite.
You can use rhn_register to register.
Red Hat Satellite or RHN Classic support will be disabled.
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:17.03.2.ce-1.el7.centos will be installed
---> Package docker-ce-selinux.noarch 0:17.03.2.ce-1.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================
 Package                                            Arch                                    Version                                                     Repository                                         Size
================================================================================================================================================================================================================
Installing:
 docker-ce                                          x86_64                                  17.03.2.ce-1.el7.centos                                     docker-ce-stable                                   19 M
 docker-ce-selinux                                  noarch                                  17.03.2.ce-1.el7.centos                                     docker-ce-stable                                   28 k

Transaction Summary
================================================================================================================================================================================================================
Install  2 Packages

Total download size: 19 M
Installed size: 65 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/docker-ce-stable/packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY ]  0.0 B/s |    0 B  --:--:-- ETA
Public key for docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm is not installed
(1/2): docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm                                                                                                                              |  28 kB  00:00:00
(2/2): docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm                                                                                                                                      |  19 MB  00:00:05
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                           3.2 MB/s |  19 MB  00:00:05
Retrieving key from https://download.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch                                                                                                                                             1/2
setsebool:  SELinux is disabled.
libsemanage.semanage_direct_install_info: Overriding docker module at lower priority 100 with module at priority 400.
  Installing : docker-ce-17.03.2.ce-1.el7.centos.x86_64                                                                                                                                                     2/2
  Verifying  : docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch                                                                                                                                             1/2
  Verifying  : docker-ce-17.03.2.ce-1.el7.centos.x86_64                                                                                                                                                     2/2

Installed:
  docker-ce.x86_64 0:17.03.2.ce-1.el7.centos                                                         docker-ce-selinux.noarch 0:17.03.2.ce-1.el7.centos

Complete!

Removing old packages did not work for me. Because they were not there at all.

 yum remove docker \
>                   docker-common \
>                   container-selinux \
>                   docker-selinux \
>                   docker-engine
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is not registered with RHN Classic or Red Hat Satellite.
You can use rhn_register to register.
Red Hat Satellite or RHN Classic support will be disabled.
No Match for argument: docker
No Match for argument: docker-common
No Match for argument: container-selinux
No Match for argument: docker-selinux
No Match for argument: docker-engine
No Packages marked for removal
NBardelot commented 7 years ago

I really love Docker, but breaking the installation process like this... How could nobody find this? Are there no tests at all before pushing to the "docker-ce-stable" repositories?

f3rdy commented 7 years ago

@NBardelot WE are the testers.

akanarelis commented 7 years ago

Anyone knows how to fix this in a Kickstart file. This is completely breaking the automated install with the following message docker-ce-17.06.0.ce-1.el7.centos.x86_64 requires container-selinux >= 2.9.

prakashriti commented 7 years ago

I have containers running in redhat and due to concept of docker EE and CE, support to redhat are now done only through EE which i need to purchase. Now the latest version of docker breaking everything during installation process.

cpuguy83 commented 7 years ago

We decided to change a dependency to rely on a RedHat provided package for the sake of compatibility instead of shipping something custom that tends to break frequently due to changes to other system packages.

This new depdency is provided in both RHEL and CentOS package repos.

sjeeva commented 7 years ago

Is this really a documentation bug?

NBardelot commented 7 years ago

@cpuguy83

The Redhat extras channel is not a repository enabled by default. Adding a dependency from that repository should not be considered "stable" as-is. It has many implications for Docker users, like repos management on the servers, plus security considerations.

At least the documentation should mention that the Redhat extras channel is now a prerequisite. But even then, putting that change in the day-to-day release cycle and in the "stable" Docker channel seems a bad choice to me.

Of course you can say that RHEL is not supported officialy for Docker-CE. But that looks like a marketing decision, and then again a bad one. If I'm not able to prove to my CTO that Docker-CE works on our RHEL environnement close to the way it works on my CentOS VM, how could I ever convince him to pay for Docker-EE ?

cpuguy83 commented 7 years ago

@NBardelot The docs were updated before 17.06 was released. CentOS is indeed different than RHEL, and yes, RHEL is not officially supported for Docker CE. These are different distributions, with different defaults... however the actual RHEL docs are also up to date as well.

NBardelot commented 7 years ago

@cpuguy83

The Docker-EE installation documentation for RHEL is indeed mentionning the fact that you need to enable the "extras" channel.

And the Docker-CE installation documentation is indeed mentionning that RHEL is not supported.

But wouldn't it be very nice if we did not need to merge with our eyes the two documentationsto to know how to install Docker-CE on RHEL ? :)

A simple caveat like "please be aware that if you still want to try Docker-CE on RHEL you have to look at the prerequisite of the Docker-EE installation guide" would suffice.

cpuguy83 commented 7 years ago

But wouldn't it be very nice if we did not need to merge with our eyes the two documentations to to know how to install Docker-CE on RHEL ? :)

Sure it might be a nice to have, but it is tricky because RHEL and CentOS are not the same thing. I would suggest proposing an edit to https://github.com/docker/docker.github.io if you think it's neccessary.

amanagarwal2189 commented 7 years ago

i have the same issue as @akanarelis does .. docker-ce-17.06.0.ce-1.el7.centos.x86_64 requires container-selinux >= 2.9.. Anyone has a solution here?

cpuguy83 commented 7 years ago

@amanagarwal2189 You must enable the extras repo which contains the container-selinux package.

NBardelot commented 7 years ago

@cpuguy83

Thanks for your time and insight. I've opened an issue to ask for better documentation: https://github.com/docker/docker.github.io/issues/3818

cpuguy83 commented 7 years ago

@NBardelot Thanks very much!

akanarelis commented 7 years ago

I did enable the extras repo and now I get a different dependancy. container-selinux-2.19.2.1.el7.noarch requires policycoreutils >= 2.5-11. this requires the updates repo. Problem is even after enabling the extras repo, theinstallation passes the check, but when package installation starts it gives the same error about docker, saying this is likely due to an error with the installation source. Any ideas?

amanagarwal2189 commented 7 years ago

@akanarelis : i am a newbie to Linux and i could not figure out how to enable the 'extras'. Can you help me with that! Secondly, i installed only container-selinux-2.9-4.el7.noarch.rpm and the docker was running post that. Not sure, however, if I was correct in doing so and will i face any issue later on due to missing dependencies.

akanarelis commented 7 years ago

i am a newbie myself, but i enabled the extras repo in my kickstart file with this line repo --name="CentOS-$releasever - Extras" --baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/

nikolai-derzhak-distillery commented 7 years ago

This install works for me on RedHat 7.3

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --enable docker-ce-edge
yum makecache fast
yum -y --enablerepo=rhui-REGION-rhel-server-extras install container-selinux
yum -y install docker-ce
smercier74 commented 7 years ago

The process below works fine for AWS RedHat 7.X instance:

sudo yum install --setopt=obsoletes=0 docker-ce-17.03.2.ce-1.el7.centos.x86_64 docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --enable docker-ce-edge
sudo yum makecache fast
sudo yum -y --enablerepo=rhui-REGION-rhel-server-extras install container-selinux
sudo yum -y install docker-ce
NBardelot commented 7 years ago

@smercier74

Yes it works. But you're stuck in 17.03 (instead of 17.06 while I write this message). And nobody knows for how long...

marcellodesales commented 7 years ago

Couldn't get to work on RHEL 7.3 from the EPEL... Could install 17.0.6 manually as follows

Uninstall any Docker version

sudo yum remove docker \
                  docker-common \
                  container-selinux \
                  docker-selinux \
                  docker-engine

Install the Docker-ce Repos

$ sudo yum-config-manager \
>     --add-repo \
>     https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: langpacks
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo

Erase existing selinux

$ sudo yum erase docker-engine-selinux
[root@pqalnpmas301 npmo-server]# sudo yum erase docker-engine-selinux
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package docker-engine-selinux.noarch 0:17.05.0.ce-1.el7.centos will be erased
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================
 Package                                   Arch                       Version                                       Repository                       Size
==========================================================================================================================================================
Removing:
 docker-engine-selinux                     noarch                     17.05.0.ce-1.el7.centos                       @dockerrepo                      43 k

Transaction Summary
==========================================================================================================================================================
Remove  1 Package

Installed size: 43 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : docker-engine-selinux-17.05.0.ce-1.el7.centos.noarch                                                                                   1/1
  Verifying  : docker-engine-selinux-17.05.0.ce-1.el7.centos.noarch                                                                                   1/1

Removed:
  docker-engine-selinux.noarch 0:17.05.0.ce-1.el7.centos

Can't find selinux-container

$ yum update
$ yum install container-selinux
Loaded plugins: langpacks
No package container-selinux available.
Error: Nothing to do

Manual Update of container-selinux

$ yum install -y ftp://195.220.108.108/linux/centos/7.3.1611/extras/x86_64/Packages/container-selinux-2.10-2.el7.noarch.rpm
Loaded plugins: langpacks
container-selinux-2.10-2.el7.noarch.rpm
Loaded plugins: langpacks
Examining container-selinux-2.10-2.el7.noarch.rpm: 2:container-selinux-2.10-2.el7.noarch
Marking container-selinux-2.10-2.el7.noarch.rpm as an update to 2:container-selinux-2.9-4.el7.noarch
Resolving Dependencies
--> Running transaction check
---> Package container-selinux.noarch 2:2.9-4.el7 will be updated
---> Package container-selinux.noarch 2:2.10-2.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                                 Arch                         Version                              Repository                                                  Size
============================================================================================================================================================================
Updating:
 container-selinux                       noarch                       2:2.10-2.el7                         /container-selinux-2.10-2.el7.noarch                        32 k

Transaction Summary
============================================================================================================================================================================
Upgrade  1 Package

Total size: 32 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 2:container-selinux-2.10-2.el7.noarch                                                                                                                    1/2
  Cleanup    : 2:container-selinux-2.9-4.el7.noarch                                                                                                                     2/2
  Verifying  : 2:container-selinux-2.10-2.el7.noarch                                                                                                                    1/2
  Verifying  : 2:container-selinux-2.9-4.el7.noarch                                                                                                                     2/2

Updated:
  container-selinux.noarch 2:2.10-2.el7

Complete!

Select a Docker Channel

$ yum-config-manager --enable docker-ce-edge
Loaded plugins: langpacks
=========================================================================== repo: docker-ce-edge ===========================================================================
[docker-ce-edge]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7Server
baseurl = https://download.docker.com/linux/centos/7/x86_64/edge
cache = 0
cachedir = /var/cache/yum/x86_64/7Server/docker-ce-edge
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = True
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7Server/docker-ce-edge/gpgcadir
gpgcakey =
gpgcheck = True
gpgdir = /var/lib/yum/repos/x86_64/7Server/docker-ce-edge/gpgdir
gpgkey = https://download.docker.com/linux/centos/gpg
hdrdir = /var/cache/yum/x86_64/7Server/docker-ce-edge/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist =
mirrorlist_expire = 86400
name = Docker CE Edge - x86_64
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7Server/docker-ce-edge
pkgdir = /var/cache/yum/x86_64/7Server/docker-ce-edge/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = docker-ce-edge/x86_64
ui_repoid_vars = releasever,
   basearch
username =

Successfully installed docker 17.06.0

$  yum -y install docker-ce
Loaded plugins: langpacks
docker-ce-edge                                                                                                                                       | 2.9 kB  00:00:00
docker-ce-stable                                                                                                                                     | 2.9 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:17.06.0.ce-1.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                              Arch                              Version                                             Repository                                 Size
============================================================================================================================================================================
Installing:
 docker-ce                            x86_64                            17.06.0.ce-1.el7.centos                             docker-ce-edge                             21 M

Transaction Summary
============================================================================================================================================================================
Install  1 Package

Total download size: 21 M
Installed size: 74 M
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/docker-ce-edge/packages/docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY0:00 ETA
Public key for docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm is not installed
docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm                                                                                                         |  21 MB  00:00:06
Retrieving key from https://download.docker.com/linux/centos/gpg
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : docker-ce-17.06.0.ce-1.el7.centos.x86_64                                                                                                                 1/1
  Verifying  : docker-ce-17.06.0.ce-1.el7.centos.x86_64                                                                                                                 1/1

Installed:
  docker-ce.x86_64 0:17.06.0.ce-1.el7.centos

Complete!
cpuguy83 commented 7 years ago

@marcellodesales The docs page lists instructions for adding the correct repos. Docker does not host container-selinux. This in on the RHEL/CentOS extras repo.

Mo33n commented 7 years ago

yum install -y ftp://195.220.108.108/linux/centos/7.3.1611/extras/x86_64/Packages/container-selinux-2.10-2.el7.noarch.rpm Loaded plugins: fastestmirror, refresh-packagekit, security Setting up Install Process container-selinux-2.10-2.el7.noarch.rpm | 28 kB 00:00 Examining /var/tmp/yum-root-3CtEPQ/container-selinux-2.10-2.el7.noarch.rpm: 2:container-selinux-2.10-2.el7.noarch Marking /var/tmp/yum-root-3CtEPQ/container-selinux-2.10-2.el7.noarch.rpm to be installed Loading mirror speeds from cached hostfile

wired00 commented 7 years ago

I'm using Redhat 7.3 from standard aws image. Red Hat Enterprise Linux Server 7.3 (Maipo), kernel 3.10.0-514.21.2.el7.x86_64.

I had this issue and @nderzhak response solved it for me.

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --enable docker-ce-edge
yum makecache fast
yum -y --enablerepo=rhui-REGION-rhel-server-extras install container-selinux
yum -y install docker-ce
archenroot commented 7 years ago

I had to enable epel-testing as there were some container-selinux, policycoreutils, etc. and underlying dependencies not available in extra for docker-ce-17.06....

troyfolger commented 7 years ago

Workaround for Fedora 26:

[as root or sudo]

# first, uninstall existing docker versions and remove the old repo:
dnf remove docker docker-common docker-selinux docker-engine-selinux docker-engine
rm /etc/yum.repos.d/docker.repo

# then get the new docker-ce repo:
dnf -y install dnf-plugins-core
dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
dnf makecache

# list packages for F25, choose a version, install it, start services
dnf list docker-ce.x86_64 --releasever=25  --showduplicates | sort -r
dnf install --releasever=25 docker-ce-17.06.0.ce-1.fc25
systemctl status docker.service 
systemctl enable docker.service 
systemctl start docker.service 
systemctl status docker.service 

# verify operation
docker ps -a
docker images
docker version
docker info

I think this approach is probably the most straightforward for Fedora, because when the F26 packages are provided , you can just drop the '--releasever=25' for interacting with the repo, no uninstall should be necessary. As a matter of fact, it should "just work" with 'dnf update' once the new packages show up.

You may find it necessary to manually install container-selinux to before installing the docker-ce package: dnf install container-selinux

Dylan-M commented 7 years ago

For RHEL 7 (tested on 7.3) you just need to enable the server extras rpms repo: subscription-manager repos --enable=rhel-7-server-extras-rpms

hatdropper1977 commented 7 years ago

This issue exists on Centos as well as RHEL:

$ uname -sr
Linux 3.10.0-514.21.1.el7.x86_64
$ cat /etc/centos-release
CentOS Linux release 7.3.1611 (Core) 
$ sudo yum-config-manager --enable extras

When I try to install docker-ce I get this error:

Error: Package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2.9
alecbz commented 7 years ago

@cpuguy83 The Docker EE documentation is still broken for the "Install from a package" section: https://docs.docker.com/engine/installation/linux/docker-ee/rhel/#install-from-a-package

There is this notice:

Note: If you have trouble with selinux using the packages under the 7 directory, try choosing the version-specific directory instead, such as 7.3.

But this did not resolve the issue for me; I still get Requires: container-selinux >= 2.9

cpuguy83 commented 7 years ago

@AlecBenzer I've confirmed that these instructions work.

Do you have a RHEL subscription enabled? Did you have it enabled when you enabled the extras repo? Are you on a cloud provider? Did you follow the cloud-provider specific setup on that install page?

alecbz commented 7 years ago

Did you have it enabled when you enabled the extras repo?

There is no mention of enabling the extras repo under the "Install from a package" section. If this needs to be done even in the "Install from a package" case, then the instructions to enable the extras repo should probably be duplicated in both sections, or moved to the earlier "Prerequisites" section.

But I feel like it somewhat violates the spirit of the "Install from a package" setup if you need to enable an extras repo. The comment that installing from a package "is useful in situations such as installing Docker on air-gapped systems with no access to the internet" no longer applies if we need to fetch a package from a remote repository.

friism commented 7 years ago

cc @mstanleyjones https://github.com/docker/for-linux/issues/20#issuecomment-326329939

mdlinville commented 7 years ago

I mean, if it violates the intent of "install from a package" then I'm not sure what to do to help. Packages have dependencies and we have no way to predict what you may or may not have already installed on your system before installing Docker.

I'm happy to update the doc to specify that you should install the extras repository or manually satisfy dependencies as they come up.

hatdropper1977 commented 7 years ago

@mstanleyjones @AlecBenzer - I would recommend adding a footnote that mentions this version, unlike previous versions, now requires the extras (not Epel*) repository (which should be enabled by default). For the casual user looking to try out Docker, the confusion over Epel/ Extras/ Centos/ Redhat etc. might be enough to scare them away.

mdlinville commented 7 years ago

See the above merged PR where this is addressed in the docs.

sabareeshkkanan commented 7 years ago

In RedHat 7 just subscribe to extras subscription-manager repos --enable rhel-7-server-extras-rpms and do yum update and try installing docker now

archenroot commented 7 years ago

@hatdropper1977 as I mentioned above, on RedHat extras repo is enough, but on Centos you need testing repo to be added and then is resolved....

thaJeztah commented 7 years ago

@archenroot if the docs need additional changes, could you open a pull request in the documentation repository? (see the pull request linked above for the file where changes need to be made)