A detailed guide on installing Portainer Docker UI Web Interface on Debian
Introduction
Prerequisites
Before we dive into the installation process, let’s make sure we have everything we need to get started:
1) Debian version 9 or newer
2) A physical or virtual server with 4GB RAM, a dual core processor and 50GB of free disk space
3) For cloud deployment a public static IP and a fully qualified domain name may also be needed
4) An SSH client such as Putty
5) Full root or sudo access to the server
Docker installation
sudo apt updateInstall some necessary packages that let apt use packages over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-commonAdd the GPG key for the official Docker repository:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpgAdd the Docker repository to APT sources:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullUpdate the package lists again:
sudo apt updateInstall Docker:
sudo apt install docker-ce docker-ce-cli containerd.ioStart and enable Docker to run on system boot:
sudo systemctl start docker sudo systemctl enable dockerNow that we have Docker up and running, let’s move on to installing Portainer.
Installing Portainer
sudo docker pull portainer/portainer-ceCreate a Docker volume to persist Portainer data:
sudo docker volume create portainer_dataStart the Portainer container:
sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ceOnce the installation process is complete, you can access the Portainer web interface through your browser by entering your server’s IP address followed by port 9000 (e.g., http://your_server_ip:9000).
Using Portainer
Logging in to Portainer
Managing Docker Containers
Portainer allows you to manage your Docker containers through its user-friendly interface. Here are some basic tasks you can perform:
1)Creating a Container:
Click on the “Create Container” button and fill in the necessary details such as the container name, image, ports, and volumes. Click “Create” to create the container.
2)Starting a Container:
Click on the “Containers” tab, find the container you want to start, and click on the play button.
3)Stopping a Container:
On the “Containers” tab, locate the container you wish to stop and click on the stop button.
4)Removing a Container:
In the “Containers” tab, find the container you want to remove, click on the three-dot menu, and select “Remove.”
Managing Docker Images and Volumes
In addition to containers, Portainer offers functionalities to manage Docker images and volumes. Here’s how you can perform some common tasks:
Pulling an Image:
On the “Images” tab, click on the “Pull Image” button and provide the image name and tag. Click “Pull” to download the image.
Creating a Volume:
Navigate to the “Volumes” tab, click on the “Create Volume” button, and enter the desired volume name. Adjust the other settings as per your requirements and click “Create.”
Exploring Portainer Settings
Portainer provides various settings that allow you to customize your experience. Some settings worth exploring include:
Endpoint Management:
Portainer allows you to manage multiple Docker endpoints, enabling you to easily switch between different Docker environments.
User and Team Management:
You can create additional user accounts and teams with different access levels and permissions.
Authentication and Security:
Secure your Portainer instance by enabling authentication methods such as OAuth or LDAP and configuring SSL/TLS certificates.