docker stack:

docker  stack deploy   部署新stack或更新现有stack  docker的版本必须高于1.25
docker stack ls            列表stack
docker stack ps            列出stack中的任务
docker stack rm            移除一个或多个stack
docker stack service      列出stack中的服务

示例代码


docker stack deploy --compose-file=/deploy.yml  napp1 
docker stack deploy -c /dlp.yml  jk

#部署监控
docker stack deploy --compose-file=/yun.yml jk527
docker service rm jk527_monitor

yaml文件

https://docs.docker.com/compose/compose-file/compose-file-v3/
https://blog.csdn.net/doubiy/article/details/118997661
https://docs.docker.com/engine/reference/commandline/stack_deploy/

查看

docker stack ls
docker stack ps N983_0