Use to manage a Docker Swarm installation on Azure

Since the shutdown of Docker Cloud, I have been looking for a replacement that is as simple and powerful as Docker Cloud. So now I am just trying out different approaches on how to make my own version of Docker Cloud. This is one of the steps towards the ultimate goal that is to create something that is 100% declarative, both for Infrastructure and the Containers running on this Infrastructure.

First, to test we need some infrastructure, but this is covered in the article:

Following the results of this article, we now have a working Docker Swarm on Azure.


Use to manage a Docker Swarm installation on Azure

What is

“ is an open-source lightweight management UI which allows you to easily manage your Docker hosts or Swarm clusters”

The plan is use this solution to manage the Containers visually from the web. Docker Swarm does not have any default ‘gui’ that makes it easy to login to the container shell, deploy stacks, monitor cpu and memory. Hopefully can bridge this gap.

Get started

To avoid bloating my own developer laptop, I create my own workspace in a Container and work from there and keep the files on Bitbucket. That way I can move my workspace around on different computers without caring about snowflakes. The template workspace setup used is shared here:

Starting the workspace container

Let’s find the commands and certificates used in the previous article.

You may need to copy the certificate files from the shared volume from /app/ubuntu to /ubuntu. This is because shared volume in Docker for Windows forces all files to get a different file mode which is not possible to change during the volume sharing.


# Login

# ssh -i <path to public certificate> -p 50000 docker@<docker swarm public IP>

ssh -i /ubuntu/geircode_19f93204_rsa -p 50000 docker@

After logging into the Docker Swarm manager, we are ready to install Portainer.

Starting Portainer

Following the docs:

Login to the Manager node and start Portainer using these commands:

curl -L -o portainer-agent-stack.yml

docker stack deploy –compose-file=portainer-agent-stack.yml portainer

Navigate to the Public IP of the “externalLoadBalancer” in Azure:

Even the “Load balancing rules” is automatically configured:

Navigate to IP and port:

Oh my…That was easy, but is it working?

Yep, it is working:)

Deploying locally on Docker for Windows

First tick this option in Docker For Windows:

Open a CMD and execute:

>> “docker swarm init”

Get the script from

Execute, and navigate to http://localhost:9000/

And it just works out of the box. That’s indeed pretty fantastic.

Goal reached and then some.

Leave a Reply

Your email address will not be published. Required fields are marked *