Portainer- A Popular GUI For Docker.

Portainer- A Popular GUI For Docker.

Hey, Dev ops fam! 👋 In this blog I will introduce a Popular GUI (Graphical User Interface) for Docker. where managing containers would be easy and You don't have to write lengthy terminal commands.

So Before we Deep dive in. I am sure you must be knowing docker. If not then check out their Official Documentation Here. So let's get started. I Gotchu GIf

Gif by Giphy.com

What is Portainer? 🤔

Portainer is a centralized multi-cluster container management platform.

It has an intuitive UI, codified best practices, and Cloud-Native design templates, Portainer reduces the operational complexity of multi-cluster container management.

Portainer provides universal support for all orchestrators like Docker, Nomad, Kubernetes, and Swarm across all platforms Data Center, Cloud, Network Edge, and IIoT.

Overview of Pointer Architecture 🗺️

89tS9SwdW.png Portainer consists of two elements: the Portainer Server and the Portainer Agent. Both run as lightweight containers on your existing containerized infrastructure. The Portainer Agent should be deployed to each node in your cluster and configured to report back to the Portainer Server container. A single Portainer Server will accept connections from any number of Portainer Agents, providing the ability to manage multiple clusters from one centralized interface. To do this, the Portainer Server container requires data persistence. The Portainer Agents are stateless, with data being shipped back to the Portainer Server container.

Prerequisite For Portainer 🗃️

Before we get started with Portainer Our first step is to check if we have an orchestrator on the system or not?. In this blog, I will be using the Docker on Windows 10. To install Docker on your System check out the installation guide by Docker itself Here.

Portainer Installation 🔧

Since the Portainer server is available as a Docker image, installation turns out to be quite simple. We will guide you through the process step by step.

  1. Step 1 -> First, we create a Docker volume that will contain the data managed by the Portainer server:

    docker volume create Portainer_data
    
  2. Step 2 -> Next, we verify that the Docker volume named “Portainer_data” exists:

docker volume ls
  1. Step 3 -> Now let’s move on to the installation of the actual Portainer server. We start the server as a Docker container from its Docker image. Unless the image is local, it will be downloaded automatically:
docker run -d -p 8000:8000 -p 9443:9443 --name Portainer \
    --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v Portainer_data:/data \
    cr.Portainer.io/Portainer/Portainer-ce:2.9.3
  1. Step 4 -> Next, we check if the Docker container named “Portainer” is running:
docker ps

How to Configure the Portainer server under Docker 🐋

If the Portainer server was installed correctly, the Portainer web interface is accessible on the local host at the specified port. In our case, it is port 9443. Now it is time to configure the Portainer server. 1.png When accessing the Portainer web interface for the first time, we are prompted to create an admin user account.

2.png We set username and password for the Portainer admin user. For security reasons, we avoid the default name “admin” and use “portadmin” instead.

1.png After logging in as an admin user, we land in the Quick Setup Wizard of the Portainer web interface. In addition to the local Docker environment, remote environments can be added.

1.png After clicking on “Get Started”, we land on the home screen of the Portainer web interface. There we are shown the Docker environments currently managed by Portainer.

i.png

After clicking on the local Docker environment, we end up in the Portainer dashboard. There we are shown the managed Docker resources. First, we call up the Portainer web interface in the browser: localhost. When using Portainer for the first time, we create an admin user account and then set up Portainer. By default, the Portainer installation uses a self-signed SSL certificate to secure the web interface via HTTPS. When accessed, a warning message may be displayed in the browser, depending on the browser and operating system.

Portainer's Use Case 🪧

It is used by some of the largest organizations in the world to deliver a powerful self-service container management experience for developers and IT teams. With more than 500,000 active users, Portainer is proven to be the simplest and most effective way of managing Docker, Swarm, and Kubernetes environments.

  • Manage Docker images – pull, delete, Build

  • Quickly deploy applications from app templates

  • Manage containers – start, stop, kill, restart, pause, resume, remove, create
  • Manage networks – add, remove, edit
  • Manage Volumes – add, remove, manage permissions, Check docker engine events

Conclusion 🪄

Portainer is a great tool that can be used to manage Docker containers, Swarm services, and other resources from a simple and intuitive web user interface. Portainer provides several free features and paid plugins that can enhance the user experience for managing Docker clusters. On the other hand, some of the paid plugins still have some restrictions or missing features that could improve the product.

Did you find this article valuable?

Support Bhavesh Mishra by becoming a sponsor. Any amount is appreciated!