0%

使用Docker部署Portainer系统

Portainer是一个轻量级的docker环境管理UI,可以用来管理docker宿主机和docker swarm集群。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version: '3.7'

services:
portainer:
image: portainer/portainer-ce
restart: always
labels:
- traefik.http.routers.portainer.rule=Host(`portainer.local.hypc.host`)
- traefik.http.routers.portainer.entrypoints=websecure
- traefik.http.routers.portainer.service=portainer
- traefik.http.services.portainer.loadbalancer.server.port=9000
volumes:
- data:/data
- /var/run/docker.sock:/var/run/docker.sock
portainer-agent:
image: portainer/agent
restart: always
labels:
- traefik.enable=false
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes

volumes:
data: