Open Griesba opened 3 years ago
once connected with ssh to nod1 run docker swarm init (to init swarm and get join token )
if ip add is requested: docker swarm init --advertise-addr
copy join command and paste it to node2
come back to node1 and run <
docker node update --role manager node2
docker swarm join-token manager
create service: (always connected to node1 in ssh mode)
docker service create --replicas 3 alpine ping 8.8.8.8
test with : docker service ls
docker serice ps
Create node with docker-machine command docker-machine create node1 (create vm with busy box)
docker-machine ssh node1 (connect to the machine in ssh mode)
docker-machine env node1
Another option is to use play-with-docker.com
You can user online plateform to create you node. At this point you need to install docker whith script you can found here get.docker.com