Docker - 通过swarm 管理 docker service
2017-07-12 11:06
603 查看
创建一个 Docker service
$docker service create --replicas 1 --name myhelloworld alpine ping docker.com
--replicas: 标识运行实例个数
--name: service 的名称
alpine ping docker.com: 运行参数,表明service将运行一个Alpine Linux container,并且执行ping docker.com的命令。
审视 Docker service
$ docker service inspect --pretty myhelloworld
--pretty: 指定返回为简约格式,否则,讲义JSON格式返回
查看 service 上运行 node 的情况
$ docker service ps myhelloworld
查看容器详细信息
$docker ps
修改service 规模
$ docker service scale myhelloworld=5
删除 service
$ docker service rm myhelloworld
轮询更新
$ docker service create \
--replicas 3 \ --name redis \ --update-delay 10s \ redis:3.0.6
查看 service 状态
$ docker service inspect --pretty myredis
更新 service
更新节点$ #docker service update --image redis:3.0.6 myredis
指定service的某个节点排满状态
$ docker node update --availability drain worker1
此后,将不会再在worker1 上面分派任务。
相关文章推荐
- Docker - 通过swarm 管理 docker service
- docker探索-使用docker service管理swarm(十一 )
- 非节点主机通过内网远程管理docker swarm集群
- 多主机网络下 Docker Swarm 模式的容器管理
- 多主机网络下 Docker Swarm 模式的容器管理
- [原创]Docker学习记录: Shipyard+Swarm+Consul+Service Discover 搭建教程
- Spring配置事务管理,service端通过@Transactional注解
- Spring配置事务管理,service端通过@Transactional注解
- Docker Swarm 集群的创建与管理几篇好文章
- Chapter 3 解决Swarm管理Docker集群节点状态一直pending的问题
- 【InfoPath应用场景:库存管理】在InfoPath Form Service利用WSS Web Service技术,通过VSTA代码把复杂表单写入SharePoint列表数据库的后继
- Docker集群管理(二)—— docker+swarm+etcd+shipyard
- [ InfoPath应用场景:库存管理 ] 在InfoPath Form Service利用WSS Web Service技术,通过VSTA代码把复杂表单写入SharePoint列表数据库 (一)
- 通过Kubernetes Minikube&Docker Swarm快速构建最小可行容器集群
- Docker集群实验环境布署--swarm【4 管理组件--manager】
- 多主机网络下 Docker Swarm 模式的容器管理
- Spring配置事务管理,service端通过@Transactional注解
- 通过Solaris10的SMF(Service Management Facility)来管理MySQL(附带MySQL安装)
- 通过docker-machine和etcd部署docker swarm集群
- Docker的Web UI管理:shipyard+swarm-(手动)安装&试用