Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list node
- docker node list
- # list all container all status
- docker service ps --no-trunc <service>
- # list container running in one of nodes
- docker service ps -f "node=manager1" redis
- # list container running only
- docker service ps -f "desired-state=running" redis
- # Swarm mode with task status 'rejected', is there a way find out why a task was rejected by agent
- docker inspect <task id>
- # change replicas
- docker service scale <nama service>=50
- # pindahan server
- # ketika vm di-clone ke vm baru, ip dan hostname baru tapi ketika ketik:
- docker swarm join-token manager
- # hasilnya masih ip vm lama, solusinya:
- sudo systemctl stop docker
- sudo rm -rf /var/lib/docker/swarm
- sudo systemctl start docker
- # kemudian mulai bikin swarm baru:
- docker swarm init
- # kemudian coba cek lagi token manager, hasilnya sudah IP baru.
- # hati hati semua service hilang :0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement