docker swarm集群安装搭建portainer UI管理

 时间:2026-04-25 15:18:19

1、这里先介绍集群的

docker swarm集群安装搭建portainer UI管理

2、运行

docker service create \

    --name portainer \

    --publish 9000:9000 \

    --constraint 'node.role == manager' \

    --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \

    portainer/portainer \

    -H unix:///var/run/docker.sock

端口号和其他挂载可以根据自己需求修改

docker swarm集群安装搭建portainer UI管理

3、然后访问你的docker主机ip+端口号9000,这里是改过端口号的,然后设置管理员密码

docker swarm集群安装搭建portainer UI管理

4、设置完成后就进入主页了

docker swarm集群安装搭建portainer UI管理

5、可以看到所有节点了

docker swarm集群安装搭建portainer UI管理

6、单机运行也很简单docker run -d -p 9000:9000 portainer/portainer -H tcp://<REMOTE_HOST>:<REMOTE_PORT>,注意端口号,和docker的要一致,可以通过docker info 查看

docker swarm集群安装搭建portainer UI管理

docker swarm集群安装搭建portainer UI管理

7、服务启动好后

docker swarm集群安装搭建portainer UI管理

8、运行和集群的一样

docker swarm集群安装搭建portainer UI管理

  • ipv4和ipv6的区别是什么?
  • 如何在64位Ubuntu中编译32位Wine
  • 手把手教你操作Wireshark
  • Packet Tracer 配置VALN
  • visual studio 多核并发开发
  • 热门搜索
    波克比怎么进化 米开朗琪罗简介 红烧鲫鱼的做法 达拉然怎么去 红烧猪脚的做法 手机反应慢怎么回事 怎么健康减肥 仙剑奇侠传98柔情版攻略 到贵州旅游攻略 美少女万华镜3攻略