主题
Portainer
Docker / Swarm / Kubernetes 的 Web 管理面板。
Docker Compose
创建部署目录:
bash
# 准备部署目录
mkdir -p ~/apps/portainer # 创建部署目录
cd ~/apps/portainer # 进入部署目录创建 compose.yaml:
yaml
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
ports:
- '9000:9000'
- '9443:9443'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/data
restart: unless-stopped启动服务:
bash
# 启动服务
docker compose up -d # 后台创建并启动服务访问
本机:https://localhost:9443 或 http://localhost:9000。
首次打开需设置管理员密码,并选择管理本地 Docker 环境。
