My Docker Infrastructure

Portainer Web Interface

During the Initial Days of the setup when I was in Grade 9, I tended to use the Docker Command Line Interface on Ubuntu (Server Edition, no GUI). My strategy was simple, On servers not having docker, execute sudo apt install docker docker-compose -y and then (for uniformity) keep all docker (if only a container) and docker-compose (if container with dependent containers) files at /opt/project-name. Write the docker-compose.yml file and hit enter on sudo docker-compose up -d and obviously use docker -it to use the docker shell.

Anyhow, lot of intro. Now, this process started becoming real tedious when the number of containers became more than 10. Every time for checking volumes, docker internal network interfaces, running containers, etc. I had to ssh and use the docker command. The came my superhero Portainer. I setup portainer on my main server by using Docker CLI for the last time. And then,


Portainer Image attached for Reference.

Portainer is a Universal Container Management System. It helps you configure, monitor and secure containers across Docker, Kubernetes, Swarm and Nomad environments.


Portainer Agent

Hosting a Portainer Instance for every docker server became really tedious. Every time, i had to keep track of the containers and in which server are they running. To access a container, I either had to visit or or or

Again Portainer to the Rescue. It has a feature named Portainer Agent which is a wrapper around the Official Docker API and claims to fix certain limitations of the Docker API. I deployed Portainer Agent on all the other servers using docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent:2.9.3 and added all the other servers to the panel at as in the Screenshots section.




Revision #7
Created 7 July 2022 02:37:21 by Atheesh
Updated 7 July 2022 08:56:23 by Atheesh