Foi informado nesta aula que quando chamamos uma URL via IP de cada vm com a porta 8080 ao consultar os comandos abaixo conseguiríamos ver em qual node estaria rodando aquela aplicação no momento.
docker node ls
docker service ps Numero_do_ID
Porém quando faço somente retonar o node vm1
docker@vm1:~$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
jusnm02908xj7fiaxk06uaagf * vm1 Ready Active Leader 19.03.5
wm7739ufr4h6bt8aonjci12gv vm2 Ready Active 19.03.5
qc3m8rffki6acvj8ljzfqandk vm3 Ready Active 19.03.5
docker@vm1:~$
docker@vm1:~$
docker@vm1:~$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
4myiad3rebgu nostalgic_bose replicated 1/1 aluracursos/barbearia:latest *:8080->3000/tcp
docker@vm1:~$
docker@vm1:~$
docker@vm1:~$ docker service ps 4my
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
dm1vesatt37d nostalgic_bose.1 aluracursos/barbearia:latest vm1 Running Running 46 minutes ago
docker@vm1:~$
docker@vm1:~$
docker@vm1:~$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
4myiad3rebgu nostalgic_bose replicated 1/1 aluracursos/barbearia:latest *:8080->3000/tcp
docker@vm1:~$ docker service ps 4my
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
dm1vesatt37d nostalgic_bose.1 aluracursos/barbearia:latest vm1 Running Running 47 minutes ago
docker@vm1:~$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
4myiad3rebgu nostalgic_bose replicated 1/1 aluracursos/barbearia:latest *:8080->3000/tcp
docker@vm1:~$ docker service ps 4my
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
dm1vesatt37d nostalgic_bose.1 aluracursos/barbearia:latest vm1 Running Running 47 minutes ago
docker@vm1:~$ docker service ps 4my
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
dm1vesatt37d nostalgic_bose.1 aluracursos/barbearia:latest vm1 Running Running 48 minutes ago
docker@vm1:~$
docker@vm1:~$
docker@vm1:~$
docker@vm1:~$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
4myiad3rebgu nostalgic_bose replicated 1/1 aluracursos/barbearia:latest *:8080->3000/tcp
docker@vm1:~$ docker service ps 4my
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
dm1vesatt37d nostalgic_bose.1 aluracursos/barbearia:latest vm1 Running Running about an hour ago
docker@vm1:~$