content
Log in to the visual interface
Visual interface to view containers and images
Container visualization interface to start, stop, restart, delete containers
Container visualization interface delete image:
Visual interface to view container details
What is portainer?
Docker graphical interface management tool! Provide a backend panel for us to operate.
portainer official installation manual: https://documentation.portainer.io/v2.0/deploy/ceinstalldocker/
Create and start portainer
docker run -d -p 8080:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --privileged=true portainer/portainer
#创建并启动portainer
[root@localhost ~]# docker run -d -p 8080:9000 --restart=always -v /var/run/
docker.sock:/var/run/docker.sock --privileged=true portainer/portainer
#如果本地没有镜像,使用docker run命令它也会拉取镜像
解释一下该命令:
doc:ker run -d 以后台运行的方式创建并启动容器
-p 8080:9000 配置端口映射,服务器外部访问端口:容器内部端口
--restart=alway 配置可视化界面的方式
-v 挂载
/var/run/docker.sock:/var/run/docker.sock #将里面的一些数据挂载到本机
--privileged=true 授权,让我们可以访问
portainer/portainer 安装控制面板
Intranet access test:
[root@localhost ~]# curl localhost:8080
<!DOCTYPE html
><html lang="en" ng-app="portainer"> #能够在内网访问
<head>
<meta charset="utf-8" />
<title>Portainer</title>
<meta name="description" content="" />
<meta name="author" content="Portainer.io" />
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
External network access test:
It takes a long time to load the configuration file for the first visit.
IP address: The host port just configured can be accessed. If it cannot be accessed, the firewall needs to open the corresponding port.
#Initial username: admin
#The first login needs to set a password
After setting the password and selecting local, you can view our local docker virtual machine
Log in to the visual interface
On the left is the menu bar. Most of what the container command line can do can be done in the container visual interface. If you don't like to use the command line, you can use the visual interface.
Visual interface to view containers and images
You can also use the visual interface to start, stop and delete containers and other operations
Container visualization interface to start, stop, restart, delete containers
Check the box to click the corresponding action