How To Add Docker

In our previous article, we have installed a rancher server on CentOS 7 machine As a single container(Non-HA). If you don’t add any external database, it has its own database. Now check How To Add Docker Host in Rancher. We can deploy and add a docker host container in the rancher server.

How To Add Docker Host In a Rancher Server:

Location of Rancher Container is /var/lib/docker/containers/2e907d74ff3d8246e

docker host in rancher

Minimum Requirement:

1. Recommended CPU w/ AES-NI

2. 1GB RAM

3. Able to communicate with a Rancher server via HTTP or https.

Check Out: Install Rancher Server

Add Host in Rancher

Go to your rancher server and click on infrastructure –> hosts

add docker to rancher

I’m using the same host where Rancher is installed & Click on Save. After clicking on save. You will see this window.

rancher docker container

Check Out: Learn Useful Tar Command With Example In Linux

Points to remember:

  • You can add a different machine where all the containers are running. I’m using the same machine.
  • Make sure if there is any firewall, You need to allow traffic from and to all other hosts on UDP ports 500 and 4500 (IPSec networking)
  • Specify the public IP of the server where containers are running.
  • Copy and paste the code on the registered host with rancher then All the containers will be in Rancher Server.

Check Out:  Check Running Container In Docker

rancher deploy docker container

Agent launched Now.

docker ps

You will see both containers which were created on this docker/Rancher server. Now it’s showing up.

Check Out: Take Backup of a Container In Docker

In the same way, you can add more Containers and hosts where Containers are running.

You’re done docker host in rancher add container deploy


Please enter your comment!
Please enter your name here