Created
June 26, 2017 21:00
-
-
Save vfarcic/99325930813d7e25375b982c7e2498d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod +x scripts/dm-swarm-08.sh | |
./scripts/dm-swarm-08.sh | |
eval $(docker-machine env swarm-1) | |
docker stack ls | |
NODE=$(docker service ps -f desired-state=Running \ | |
go-demo_main | tail -n 1 | awk '{print $4}') | |
eval $(docker-machine env $NODE) | |
CONTAINER_ID=$(docker container ls -q \ | |
-f "label=com.docker.swarm.service.name=go-demo_main" \ | |
| tail -n 1) | |
docker container exec -it \ | |
$CONTAINER_ID pkill go-demo | |
docker stack ps go-demo | |
NODE=$(docker service ps -f desired-state=Running \ | |
go-demo_main | tail -n 1 | awk '{print $4}') | |
docker-machine rm -f $NODE | |
docker-machine ls | |
NODE=$(docker-machine ls -q | tail -n 1) | |
eval $(docker-machine env $NODE) | |
docker stack ps go-demo | |
docker-machine rm -f swarm-1 swarm-2 swarm-3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment