Skip to content

How to Install Docker-CE in Redhat 8 ?

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all the parts it needs, such as libraries and other dependencies, and deploy it as one package.

Installing Docker-CE in Redhat 8

Step 1

Open your Redhat 8 terminal. Your terminal would look like this. Also, make sure you are login as root.

Install Step 1

Step 2

Run the following commands.

cd /etc/yum.repos.d/
ls

Now you will see some files with .repo extension, as shown below.

Install Step 2

Step 3

Now we are going to create our own file docker.repo follow the below commands.

cat > docker.repo
[docker]
baseurl=https://download.docker.com/linux/centos/7/x86_64/stable/
gpgcheck=0

In the next line press CTRL+D to stop appending data.

Install Step 3.1

If you want to check whether the file is created or not, run “ls” command and check for docker.repo, and if u want to see the content of the file run, “cat docker.repo“.

Install Step 3.2

Step 4

Now we are going to install docker so make sure you are connected to internet (try pinging in google).

Install Step 4.1

And run the following command. When asked for confirmation press ‘y‘.

yum install docker-ce --nobest

Wait for the process to complete. When the process completes docker is installed in your system.

Install Step 4.2

Install Step 4.3

Install Step 4.4

Install Step 4.5

Step 5

To check you can run the following command

rpm -q docker-ce

Install Step 5.1

or

systemctl start docker
docker version

Install Step 5.2