Install Docker on RHEL 8

Yesterday, I tried to install docker on RHEL 8 VM(As Redhat provides a free subscription for up to 16 VM’s, All you need to do is to sign in to the Developer Portal and accept the current T&C’s, then you can use the free no-cost RHEL developer subscription More info here ).
At the start I ran into issues, so thought of sharing my experience.

Lets start:
After configuring the repo by following an online blog, I ran into error shown below:
DNF version: 4.2.23
cachedir: /var/cache/dnf
Docker CE Stable — x86_64 46 kB/s | 3.5 kB 00:00
created by dnf config-manager from https://download.docker.com/linux/centos/docker-ce.rep 292 B/s | 381 B 00:01
Errors during downloading metadata for repository ‘download.docker.com_linux_centos_docker-ce.rep’:
— Status code: 404 for https://download.docker.com/linux/centos/docker-ce.rep/repodata/repomd.xml (IP: 13.249.214.4)
Error: Failed to download metadata for repo ‘download.docker.com_linux_centos_docker-ce.rep’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

The above issue occurred due to the wrong path in the docker repo, which was moved permanently more info here.

you can follow below steps to install docker flawlessly on RHEL8
Step 1. Install the yum-utils package (which provides the yum-config-manager utility) and set up the stable repository.
$ sudo yum install -y yum-utils

Step 2. Configure the docker repo
$ sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

Step 3. Install docker Community edition
$ sudo yum install docker-ce docker-ce-cli containerd.io

Step 4. Enable docker service

$ sudo systemctl enable docker.enable

Step 5. Start docker engine
$ sudo systemctl start docker.service

Step 6. Run docker Hello world

$ sudo docker run hello-world

Thanks for reading, I hope you will find it useful. Show your support by giving a clap & comment.
In case if you face any issue contact me on LinkedIn, (Ashwani Singh)

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Scrum Gathering London 2018 (1)

Building OpenCV 4.10 on Raspian Buster and Raspberry PI4

Cloud-Native Advantages of Moving Your ETL Process to Cloud Run

Setting Up a Server on DigitalOcean — Pt 1

Why Amazon EventBridge will change the way you build serverless applications

Funnel Rocket: A Cloud Native Query Engine

Generating Microsoft Excel XLSX files in Java

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ashwani Singh

Ashwani Singh

More from Medium

Local caching mirror for Ubuntu APT

Install docker on CentOS 8 | Rocky Linux 8

Install docker on CentOS 8 | Rocky Linux 8

Using Linux Run Levels for VM termination tasks

How To: Install Apache Web Server on CentOS 8 [No Fluff]