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/
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:
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.
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.
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.
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"
- 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 restart docker
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 —