2
头图
When operating Docker before, I have always used the command line format. Although the command line looks pretty cool, it can be cumbersome sometimes. Today I recommend a Docker graphical tool, Portainer, which is lightweight and easy to use. I hope it will help you!

SpringBoot actual combat e-commerce project mall (40k+star) address: https://github.com/macrozheng/mall

Introduction

Portainer is a lightweight application that provides a graphical interface for easy management of Docker environments, including stand-alone environments and cluster environments.

installation

It is very convenient to install Portainer directly using Docker, and it only takes two steps to complete.
  • First download Portainer's Docker image;
docker pull portainer/portainer
  • Then use the following command to run the Portainer container;
docker run -p 9000:9000 -p 8000:8000 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /mydata/portainer/data:/data \
-d portainer/portainer
  • When logging in for the first time, you need to create an administrator account and access address: http://192.168.5.78 :9000/

  • Then we choose to connect to the local Docker environment. After the connection is complete, we can happily use Portainer for visual management!

use

  • After successful login, you can find a local Docker environment;

  • Open the Dashboard menu to see the overview information of the Docker environment, such as how many containers are running and how many images are there;

  • Open the App Templates menu and you can see many templates for creating containers. You can easily create containers through template settings. There are still many supported applications;

  • Open the Containers menu, you can see the currently created container, we can run, pause, delete and other operations on the container;

  • Select a container, click the Logs button, you can directly view the container running log, and you can say goodbye to the docker logs

  • Click the Inspect button to view container information, such as the IP address of the container running;

  • Click the Stats button, you can view the usage of the container's memory, CPU and network, and performance analysis is easy;

  • Click the Console button, you can enter the container to execute commands, for example, we can enter the MySQL container to execute login commands;

  • Open the Images menu, we can view all the local mirrors, and manage the mirrors;

  • Open the Networks menu, you can view the network conditions in the Docker environment;

  • Open the Users menu, we can create Portainer users and assign them corresponding roles;

  • Open the Registries menu, we can configure our own mirror warehouse, so that when pulling the mirror, we can choose to pull from our own mirror warehouse.

to sum up

Portainer, as a lightweight Docker graphical management tool, is powerful and practical. If there is a private mirror warehouse management function, it would be better, so that we don't need to install the heavyweight mirror warehouse Harbor.

Official website address

https://github.com/portainer/portainer

This article GitHub https://github.com/macrozheng/mall-learning has been included, welcome to Star!

macrozheng
1.1k 声望1.3k 粉丝