Docker

Connect Docker Host into Portainer

Connect Docker Host to Portainer Dashboard

Connect Docker Host into Portainer | After you have succesfully Install Portainer, you can connect docker host into Portainer using several ways. Here, we will connecting docker host to Portainer using Docker API.

In Docker Host

  1. Open docker service file
     vi /lib/systemd/system/docker.service
  1. Find the line which starts with ExecStart and adds -H=tcp://0.0.0.0:2375 in the end
  2. Save the modified file
  3. Reload docker daemon
systemctl daemon-reload
  1. Restart docker

         service docker restart

  1. To test if it successful, run this command
curl http://localhost:2375/images/json
  1. If everything is fine below command should return a JSON

 

In Portainer Dashboard

  1. Open portainer dashboard
  2. Goto endpoint > Add endpoint

          add endpoint

  1. Fill these field

             endpoint option

            Name                : free to fill

            Endpoint URL    : <Docker Host IP>:2375

  1. If you still got failed, check your firewall, don’t forget to add port 2375/tcp, go to this link if you want to know how to configure firewalld

 

That are  the steps configuring your Portainer Dashboard with Docker Host using Docker API. Follow those steps to get your portainer works well with docker host

Tags : dockerdocker compose portainerdocker install portainerdocker portainer installdocker run portainerdocker swarm portainerinstall portainerinstall portainer dockerportainerportainer dockerportainer docker composeportainer docker swarmportainer githubportainer installportainer ioportainer kubernetesportainer portportainer swarmportainer windows

Leave a Response

We would like to show you notifications for the latest news and updates.
Dismiss
Allow Notifications