Portainer

Portainer

Portainer simplifies managing Docker containers by providing a visual interface for your environment. While many people use the CLI for Docker, it can become challenging in larger setups to identify which images, volumes, and networks are in use and which are redundant. Portainer makes this process much easier by offering clear visibility into your Docker environment. It also allows you to view logs, manage containers, and even connect directly to them. For any home lab running Docker, Portainer is an essential tool that streamlines container management.

User Interface

To access the portainer interface it is though the host computers ip and port. This is the case with many docker containers and it is true here as well. Here is the home view of portainer.

As you can see there are stacks, containers, images, volumes and networks that you can configure.

The interface is modern and looks good, lets go into containers to see what we are running.

Containers

In this section, you can easily see which containers are running and which are stopped. You can also select multiple containers to delete, restart, pause, and more. It's a straightforward way to visualize and manage your environment. The other sections, like volumes, images, and networks, have a similar layout, making it simple and intuitive to navigate. Overall, Portainer provides a clean, efficient way to manage your containers with ease.

Installation

For the installation we will use docker compose. Create a file called docker-compose.yml and paste this information into it:

This docker-compose file tells us this:

  1. Create docker volume portainer
  2. Service name = portainer
  3. image: portainer/portainer-ce:latest
  4. Port 8000 is for HTTP & Port 9443 is for HTTPS
  5. - /var/run/docker.sock:/var/run/docker.sock Gives portainer docker information required for it to work
  6. - portinaer:/data mounts the portainer volume we created to the portainer data "This lets us have persistent storage one we rebuild the container"
version: '3'

volumes:
  portinaer:   

services:
  portainer:
    image: portainer/portainer-ce:latest
    container_name: portainer
    restart: always
    ports:
      - "9000:9000" 
      - "9443:9443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portinaer:/data
Next Steps:

Go to the dir with the docker-compose.yml file and run docker-compose up -d

Then go to http:server-ip:9000

Congrats! You now should have a working Portainer instance!