Ghi chép lại quá trình tìm hiểu Docker
docker swarm init \
--advertise-addr 192.168.50.149:2377 \
--listen-addr 192.168.50.149:2377
docker node ls
docker swarm join-token [worker|manager]
docker swarm join --token SWMTKN-1-596if2hdftmn9b80tyyrhvjlzpb40zb60cyd352jlyfzfk8tse-bnvzq2tdyvpjvkw8ovtmgx1he 192.168.50.149:2377
lam@mgr:~$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
rxay0isydwn17u50zwvwjq06b * mgr Ready Active Leader 19.03.4
wbdorfd7fa0nuv19lpdckg0x8 wkr Ready Active 19.03.4
lam@mgr:~$
docker service create [option] <image>
docker service ls
docker service ps <tên service>
--mode
:
docker service scale <tên service>=10
docker service rm <tên service>
END.
Tài liệu tham khảo từ Sách Docker Deep Dive - Nigel Poulton