Skip to content

Portainer

Docker / Swarm / Kubernetes 的 Web 管理面板。

Docker Compose

创建部署目录:

bash
mkdir -p ~/apps/portainer
cd ~/apps/portainer

创建 compose.yml

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
      - portainer_data:/data
    restart: unless-stopped

volumes:
  portainer_data:

启动服务:

bash
docker compose up -d

访问

本机:https://localhost:9443http://localhost:9000

首次打开需设置管理员密码,并选择管理本地 Docker 环境。

基于 MIT 许可发布