When I use the instruction “docker deploy -c docker-compose.yaml cluster” to deploy services to all swarm nodes, all decker services are deployed automatically the manager node. Specifically, my docker-compose.yaml file is as following:
version: "3.9"
services:
node0:
image: bserv128:0.1
ports:
- 8070:6550
expose:
- "6550"
hostname: node0
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node1:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node1
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node2:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node2
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node3:
image: ttqs123/bserv128:0.1
ports:
expose:
- "6550"
hostname: node3
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node4:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node4
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node5:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node5
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node6:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node6
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node7:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node7
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node8:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node8
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
node9:
image: bserv128:0.1
ports:
expose:
- "6550"
hostname: node9
entrypoint: ./bin/serv -test.run TestServer -test.v
networks:
- eth0
volumes:
- ./node.json:/bin/node.json
networks:
eth0:
name: net1
driver: overlay
attachable: true
I wanna to query which problem that causes the above issue is in the docker-compose.yaml file.