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.
After configuring the repo by following an online blog, I ran into error shown below:
DNF version: 4.2.23
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: 22.214.171.124)
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 \
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.service
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)