Home » Docker: Install Docker on RHEL 7/CentOS 7

Docker: Install Docker on RHEL 7/CentOS 7

by Pring
Docker: Install Docker on RHEL 7/CentOS 7

I. Introduction.

This article describes how to Install Docker on RHEL 7/CentOS 7.x
Readers: Those who want to install Docker
How to install: Basically, proceed as described in the official guide: https://docs.docker.com/install/linux/docker-ce/centos/

II. Prerequisites.

1. Login to your system via SSH. You can use PuTTy tool or Poderosa tool,…
2. Login with root user.  If you are logged in as another user, you will need to add sudo before each command.
3. Remove older version of Docker installed. 
    In the case, if you have an older version of Docker installed. Please uninstall it with the related dependencies.
Enter the command below.

yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine

III. How to install Docker on Linux – CentOS 7 step by step.

To install Docker on Linux – CentOS 7. Follow these steps:

Step 1. Update your system.
Step 2. Install Docker.
Step 3. Verify the installation.
Step 4. Install Proxy to Docker.

You can see details of Video on how to install Docker on Linux – CentOS 7 as below.
[Sorry, the video we will update later]

Or you also can see details as below.

Step 1. Update Your System.

The official Docker guide says that only CentOS 7 version is supported, so please update the OS first.
Enter the command below.

yum update
yum upgrade

Step 2. Install Docker.

1. Install Repository.

First, you need to set up the repository with the command below.

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo

2. The next, install Docker CE

Install the latest version of Docker CE, use the following command.

yum install -y docker-ce docker-ce-cli containerd.io

3. Finally, start Docker

Launch docker is installed with the following command.

systemctl start docker

In case you want Docker to start automatically when the System starts, use the following command.

systemctl enable docker

Step 3. Verify the installation.

To check the version of Docker installed, you can use the following command.

docker –version

Step 4. Install Proxy to Docker.

If you have built Docker in your local network using Proxy, you need to install Proxy for it.
You can also refer to the official Docker documentation as follows: https://docs.docker.com/config/daemon/systemd/

1. Create directory [docker.service.d] using the following command.

mkdir -p /etc/systemd/system/docker.service.d

2. Create the file [http-proxy.conf] into the directory created above.

vi /etc/systemd/system/docker.service.d/http-proxy.conf

3. Copy the content below into the file [http-proxy.conf]

[Service]
Environment="HTTP_PROXY=http://<user>:<pass>@<proxy_host>:<proxy_port>" "HTTPS_PROXY=http://<user>:<pass>@<proxy_host>:<proxy_port>" "NO_PROXY=localhost"

Explain:

  • proxy_host: Host proxy of your system
  • proxy_port: Port proxy of your system
  • user: your account
  • pass: your password

After performing the above operations, restart docker, use the following command.

systemctl daemon-reload
systemctl restart docker

IV. Conclusion.

In this tutorial, we was Install Docker on RHEL 7/CentOS 7 server. If you hit a problem or have feedback, leave a comment below.
You can now visit the official Docker Documentation page and learn how to get started with Docker.


Install Docker on RHEL 7/CentOS 7 is complete. Wish you success and luck.
Thanks and best regards!
— Pring —

Related Articles

3 comments

vurtil opmer December 2, 2019 - 8:31 am

You made some decent points there. I regarded on the internet for the difficulty and found most people will go together with together with your website.

Reply
alcohol rehab nea rme February 27, 2020 - 3:20 pm

Oh my goodness! Impressive article dude! Thank you so much, However I am experiencing issues with your RSS.
I don’t know why I can’t subscribe to it. Is there anyone else having the same
RSS problems? Anyone who knows the answer can you kindly respond?
Thanx!!

Reply
john deere z525e reviews September 17, 2020 - 4:14 pm

The garbage bin can take larger tools such as the shovel or rack whilst the spare bucket utilized to support the branch cutter or gloves.
Clay soil:If the soil has really small particles, that is an indication of huge, sticky clay soil.
To bring the fun of the garden to your home, different
ways can be used such as window boxes, vertical
gardens and planters.

Reply

Leave a Comment