Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install Docker CE 17.03 on RHEL7

Tags:

docker

redhat

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

  • There is information here:

    • https://docs.docker.com/engine/installation/linux/rhel/#install-using-the-repository about the installing Docker on RHEL but there is no version info.
  • and here with Docker 17.03 but only in Docker EE not Docker CE

    • https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.0_Release_Notes/sect-Red_Hat_Enterprise_Linux-7.0_Release_Notes-Linux_Containers_with_Docker_Format-Using_Docker.html but they talk about Docker v 0.12
like image 452
user3313834 Avatar asked Mar 23 '17 15:03

user3313834


People also ask

Is Docker CE supported on RHEL 7?

OS requirements. To install Docker Engine, you need a maintained version of RHEL 7, RHEL 8 or RHEL 9 on s390x (IBM Z). Archived versions aren't supported or tested.

Is Docker supported on Red Hat?

The docker package is not shipped or supported by Red Hat for Red Hat Enterprise Linux (RHEL) 8. The docker container engine is replaced by a suite of tools in the Container Tools module.


3 Answers

As per the documentation here, 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
like image 82
Matt Schuchard Avatar answered Oct 11 '22 21:10

Matt Schuchard


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.

like image 34
Bertrand_Szoghy Avatar answered Oct 11 '22 22:10

Bertrand_Szoghy


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.

like image 19
Akash Srivastava Avatar answered Oct 11 '22 21:10

Akash Srivastava