docker_practice/swarm_mode/rolling_update.md

47 lines
1.9 KiB
Go
Raw Normal View History

# SWarm mode
2018-05-23 17:16:51 +08:00
[](deploy.md) 使 `nginx:1.13.7-alpine` `nginx`
`NGINX` `1.13.12` Swarm mode
使
Swarm mode
使 `docker service update`
```bash
$ docker service update \
--image nginx:1.13.12-alpine \
nginx
```
使 `--image` 使 `docker service update`
`--secret-add`
`--secret-rm`
`docker service update -h`
## 退
2018-05-23 17:16:51 +08:00
`nginx` `nginx:1.13.12-alpine` 使退
```bash
$ docker service rollback nginx
```
使 `docker service ps` `nginx`
```bash
$ docker service ps nginx
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
rt677gop9d4x nginx.1 nginx:1.13.7-alpine VM-20-83-debian Running Running about a minute ago
d9pw13v59d00 \_ nginx.1 nginx:1.13.12-alpine VM-20-83-debian Shutdown Shutdown 2 minutes ago
i7ynkbg6ybq5 \_ nginx.1 nginx:1.13.7-alpine VM-20-83-debian Shutdown Shutdown 2 minutes ago
```
退