docker build -t trodix/demo-replicas-docker .
docker swarm init --advertise-addr 192.168.1.18
docker service create --name "DemoReplicasDocker" -p 7000:7000 --replicas=2 trodix/demo-replicat-docker
docker service logs -f "DemoReplicasDocker"
curl 192.168.1.18:7000/hello
services:
demo-replicas-docker:
image: trodix/demo-replicas-docker
ports:
- "7000:7000"
deploy:
replicas: 2
docker stack deploy --compose-file docker-compose.yml DemoReplicasDocker
docker service logs -f DemoReplicasDocker_demo-replicas-docker
curl 192.168.1.18:7000/hello