Portainer is a docker container management system in Linux. It allows you to manage both local and remote containers using the Docker API. Recently, Docker is gaining more and more popularity due to the ability to quickly deploy complex applications consisting of a large number of services.
With Portainer, you can monitor the status of containers, start, stop, and delete them, deploy new applications, and much more. In this article, we will install Docker Portainer on your computer, as well as learn a little about it.
This article is suitable for both Linux Mint and Ubuntu, including ubuntu server (this is how I use it).
To complete this article, you will need Docker already installed on your system. I will not tell you in detail how to install dokker and dokker-compose. To do this, use this article for Ubuntu. Personally, I have just installed Docker.io from software manager
or use terminal
We will also add Docker as a system service so that it runs with the system
Portainer is installed as a container inside Docker. So we’ll add storage
Now install the Portainer
To make sure that Portainer is running, run this command (if you already have containers installed and running, they will also be displayed here):
You can access the program via the web interface on port 9000. Open it in your browser. In the first step, you will need to enter the username and password that you will use to log in. Then select the method for connecting to Docker. I will connect to the local Docker service that I just installed. To do this, select Local:
After clicking Connect you will be in the container control panel. First, you need to select the node where you will manage the containers, in this case, it is local.Here you can already manage your containers. For example, in the Containers section, you can view all available containers: In the App Templates section, you can deploy a new app based on one of the existing templates. For example, let’s deploy WordPress. To do this, find it in the list and click on it: Here you need to configure the template. In this case, you need to specify the application name and set a password for the database. After that, click the Deploy the stack button and the new application will appear in the list of the Stacks section.
As you can see, the program now reports that it has full control over this app because it created it.
If you open the app, its containers will be displayed there. For each container, you can view logs, open ports, and even connect via the terminal. To view the logs, click on the notebook-like icon next to the container status.
For the command line, there is an icon next to the input prompt symbol.
And open ports are located at the very end of the container characteristics in the Published ports section.
If you click on the link labeled 32768: 80 for the WordPress container, you will be taken to the WordPress sitePlease note that WordPress will be available by default on a non-standard external port — in this case, 32768. If necessary, in the settings of the wordpress container, you can change the port to 80, but it is better to install an additional container with nginx and use this product to proxy traffic, enable SSL, and so on. In addition, the use of nginx for processing external connections is also justified in the event that you need to host another site or application. In this case, additional applications will use separate, unique ports, and with the help of nginx and the use of proxy_pass directives, you can configure the simultaneous operation of an almost unlimited number of applications within a single docker node.
How to update Portainer:
To update Portainer, delete the current image and run it again. This will not cause any problems, since when creating the previous image, we used external storage for data storage. Stop the image and delete it:
Download the new version
Then it remains to install Portainer again:
As you can see, Portainer is very simple, but it helps you use containers well. You can also connect remote nodes to it, but you need them to have a public IP address, because you can’t interact with them on the local network.
May The Force Be With You!