To Add Portainer GUI to Your Docker Swarm Cluster

mingderwang
Kubernetes Playground
2 min readSep 23, 2017

If you haven create your swarm, please see my previous blog “Setup a Docker Swarm in Docker Playground in X mins” You can get your swarm ready in less than 5 minutes.

Just issue the following command on your master node console, you will see a NodePort 9000 is pop-up on your playground web page as follow;

docker service create \
--name portainer \
--publish 9000:9000 \
--constraint 'node.role == manager' \
--mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \
portainer/portainer \
-H unix:///var/run/docker.sock

Click on that 9000 button, you well link to a web page for login as admin as follow; type-in your password and confirm it. (You can add other users or groups later)

Then, you can see the dashboard for overview of your docker swarm cluster as following screenshot.

There are some app templates you can use to add services just using this GUI without any docker commands. (just click on App Templates on the menu as seeing as follow)

Having fun!

--

--