install Docker CE 17.03 on RHEL7

DockerRedhat

Docker Problem Overview


Is it possible to install DockerCE in the specific version 17.03 on RHEL7 ?

Docker Solutions


Solution 1 - Docker

As per the documentation [here][1], you can install Docker CE 17.03 (or future versions) on RHEL 7.3 64-bit via:

Set up the Docker CE repository on RHEL:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast

Install the latest version of Docker CE on RHEL:

sudo yum -y install docker-ce

Alternatively, you can specify a specific version of Docker CE:

sudo yum -y install docker-ce-<version>-<release>

Start Docker:

sudo systemctl start docker

Test your Docker CE installation:

sudo docker run hello-world

[1]: https://store.docker.com/editions/community/docker-ce-server-centos?tab=description "Docker RHEL7"

Solution 2 - Docker

Procedure for a disposable dev test RHEL 7.3. Never do this in production.

# pre-requisite for container-selinux-2.9-4.el7.noarch.rpm
sudo yum install policycoreutils-python

wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
sudo rpm -i container-selinux-2.21-1.el7.noarch.rpm

#Set up the Docker CE repository on RHEL:
sudo yum install -y yum-utils
sudo yum install -y device-mapper-persistent-data lvm2
sudo yum-config-manager --enable rhel-7-server-extras-rpms
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast

# Install the latest version of Docker CE on RHEL:
sudo yum -y install docker-ce

#Start Docker:
sudo systemctl start docker

#Test your Docker CE installation:
sudo docker run hello-world

# configure Docker to start on boot
sudo systemctl enable docker

# add user to the docker group 
sudo usermod -aG docker jethro

# install Docker Compose:
# install python-pip
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

sudo yum install ./epel-release-latest-7.noarch.rpm
sudo yum install -y python-pip

sudo pip install docker-compose

# upgrade your Python packages:
sudo yum upgrade python*

The above assumes you are NOT using a proxy. If you are, you will need to add proxy=http://myproxy:myport lines pretty much at the end of each block in each file under /etc/yum.repos.d/, or add it to /etc/yum.conf.

Hope this helps.

Solution 3 - Docker

For those who are facing below error:

Error: Package: docker-ce-17.06.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

While installing docker on RHEL 7.3+ we need to execute:

    sudo subscription-manager repos --enable rhel-7-server-extras-rpms

which will enable extra rpms to be installed on yum update.After this execute:

    sudo yum update

Then follow: Install Docker

This has worked for me.

Solution 4 - Docker

INSTALLING DOCKER RHEL/CENTOS

  1. Got To: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

download: docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm 2018-06-08 05:48 19M download: docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm 2018-06-08 05:48 29K

Upload to server

  1. yum -y install docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm

  2. yum -y install docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm

  3. sudo systemctl start docker

  4. REF: https://stackoverflow.com/questions/42981114/install-docker-ce-17-03-on-rhel7 https://nickjanetakis.com/blog/docker-tip-39-installing-docker-ce-on-redhat-rhel-7x https://docs.docker.com/install/linux/docker-ee/rhel/#set-up-the-repository

Solution 5 - Docker

Well maybe you can acheive installing Docker CE 17.06 or 17.03 on RHEL 7.3, but Docker documentation is quite clear:

> Docker Community Edition (Docker CE) is not supported on RHEL.

See https://docs.docker.com/engine/installation/linux/docker-ee/rhel/

Solution 6 - Docker

I had the same problem running 7.x and I did the following:

yum install -y yum-utils
    
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
     
rpm -ivh epel-release-latest-7.noarch.rpm
    
subscription-manager repos --enable=rhel-7-server-extras-rpms
    
yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.55-1.el7.noarch.rpm
    
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    
yum install -y docker-ce
    
systemctl restart docker

With this you'll not fall on the pigz error

Error: Package: docker-ce-18.03.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
           Requires: pigz
 You could try using --skip-broken to work around the problem

Also you need to keep an eye on the container-selinux since i'm using a direct link to the version 2.55-1

Solution 7 - Docker

By following From @Matt Schuchard and @Akash Srivastava

combining their commands together I found below command lines working for me.

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo yum update
sudo yum -y install docker-ce
sudo systemctl start docker

Thank you

Solution 8 - Docker

We had offline environment, so I figure out to install all required packages one by one.

  • Run online.sh script to download these packages.

  • Copy these packages to your server scp -r *.rpm my.server:/tmp

  • Go to your server , cd /tmp, then run offline.sh script.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3313834View Question on Stackoverflow
Solution 1 - DockerMatt SchuchardView Answer on Stackoverflow
Solution 2 - DockerBertrand_SzoghyView Answer on Stackoverflow
Solution 3 - DockerAkash SrivastavaView Answer on Stackoverflow
Solution 4 - DockerFred OndiekiView Answer on Stackoverflow
Solution 5 - DockerAntoine PalaviouxView Answer on Stackoverflow
Solution 6 - DockerPekosoGView Answer on Stackoverflow
Solution 7 - DockerSanthosh HirekerurView Answer on Stackoverflow
Solution 8 - DockerAbdennour TOUMIView Answer on Stackoverflow