xxxxxxxxxx
# docker network list
docker network ls
xxxxxxxxxx
# docker service create
docker service create <image-name> <option>
# example
docker service create alpine ping 8.8.8.8
xxxxxxxxxx
# docker manager join token
docker swarm join-manager manager
xxxxxxxxxx
#docker service create with replicas
docker service create --replicas <count> <image-name> <option>
# example
docker service create --replicas 3 alpine ping 8.8.8.8
xxxxxxxxxx
# docker service update service with replicas/ scaling
docker service update <service-id/service-name> --replicas <count>
#Example
docker service update mqtt_client --replicas 3
xxxxxxxxxx
# docker node update role
docker node update --role <manager/worker> <node-name>
#Example
docker node update --role manager node2
xxxxxxxxxx
# adding user mod to docker or adding user to docker
sudo usermod -aG docker <username>