Docker Website (3) Portainer

1. About Portainer

Reference:
Portainer official website
https://www.portainer.io/

Portainer (based on Go) is a graphical management tool for Docker, providing status display panels, rapid deployment of application templates, basic operations of container image network data volumes (including uploading and downloading images, creating containers, etc.), event log display, container console Centralized management and operation of operations, Swarm clusters and services, login user management and control, and other functions. Portainer allows you to manage Docker containers, images, volumes, networks, and more. It is compatible with standalone Docker Engine and Docker Swarm. Portainer simplifies container management in Swarm and Kubernetes environments. It is used by software engineers and DevOps teams to simplify and speed up software deployment. The functions are very comprehensive, and can basically meet all the needs of small and medium-sized units for container management.

One sentence summary: Portainer is a visual Docker operation interface.

2. Install Portainer

2.1, command line

Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.

2.2, Pagoda

In the Image tab of the Pagoda Docker module, pull the image:

Pull image

Then add the container:

Add container

The port can be customized, and the data directory can be customized. Note that you must click the Add button after inputting.

3. Initialization

Follow the method of the second article in this series to add a website, reverse proxy, and set up an SSL certificate.

refer to:

Docker website building (2) Docker installation and basic instructions
https://blog.tsinbei.com/archives/680/

Visit the website and enter the Portaniner installation interface.

Add Account

You only need to set the administrator account and password, click Next, and select Local on the new page to complete the installation.

Socket connected to Docker

4. Use

Take WordPress installation as an example:

Enter the Portainer page, select the Containers option on the left, and click the Add container button above to go to the page shown in the figure;

Add container

Enter the container name in the Name column;
Enter the container image name in the Image column. For example, if you want to install wordpress, enter wordpress, and the system will automatically pull the wordpress container image;

Set parameters

Set the port. If the Publish all exposed ports switch is enabled, the system will randomly open a port to map to the container port.

In addition, you can click map additional port to add a custom port (it should be noted that host can enter any non-conflicting port, and container needs to enter the corresponding port according to the specific container image. Fill in 80 here);

The host corresponds to the server port, so it is necessary to ensure that the security group opens the port
If you don't know the port of the container image, you can check it on the DockerHub website according to the type of container image you use.

Click Restart policy to select Always, which means that the container will automatically restart no matter under what circumstances it stops;
Click Deploy the container to create the container;

create container

After the container is created, the old method, NGINX reverse proxy, can be accessed using the domain name.

Visit Website

Docker Website (3) Portainer

https://blog.tsinbei.com/en/archives/636/

Author
Hsukqi Lee
Posted on

2022-12-06

Edited on

2023-05-21

Licensed under

CC BY-NC-ND 4.0

Comments

Name
Mail
Site
None yet