跳到正文

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 环境。

基于 MIT 许可发布