DEV Community

Cover image for Docker
Chandan Sharma
Chandan Sharma

Posted on

Docker

To start learning you need to have environment, so lets create our lab where you can practice the code.
We gonna setup the lab on Redhat 8
So where you will have Redhat 8 then, well you can use virtualbox or AWS or Google Cloud or Azure, I leave upto you.
I am using Google Cloud, where I have spin up an Redhat Enterprise Edition 8 instance. We call this as our Host machine.

Lets set up the the docker.

Install Docker on Redhat 8

Officially you cannot setup Docker on Redhat 8, with below steps you can do it.

Step1: Create docker repository
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

Step2: Install stable docker version
yum install docker-ce --nobest

ce - represents Community Edition
--nobest - will install the latest stable version

Step3: Enable and validate your Docker
Once you install your docker, you want it to continuously run, for that enable the docker with below commands.

sudo systemctl enable --now docker

This will enable the docker permanently, if you restart your host, your docker will keep running.

After enabling, you can validate with below commands.

systemctl is-enabled docker
systemctl is-active docker

Alt Text

Now lets check docker version:
docker version

If you want to have more information about the docker installed, use
docker info

Thats it, you have your lab ready!!!!

Top comments (0)