给指定节点添加label:
docker node update <node_id> --label-add manager=yes获取所需镜像:
docker pull portainer/portainer-ce:2.0.0-alpine docker pull portainer/agent:linux-amd64-2.0.0-alpine获取部署模板并修改:
curl -L https://downloads.portainer.io/portainer-agent-stack.yml -o portainer-agent-stack.yml部署命令:
docker stack deploy --compose-file=portainer-agent-stack.yml portainer