Docker Community Forums

Share and learn in the Docker community.

After docker stack deploy, docker service replica is 0/1

Hello.

I tried to deploy 2 swarm mode on single host.
First one is succeed. However, second one has failed.

The situation is like follows


1) docker-stack.yml
version: “3.7”
services:
exporter:
image: nginx:1.16.1
deploy:
mode: global
ports:
- ‘9988:9988’

2) command line on the terminal

  • docker stack deploy -c docker-stack.yml monitor

3) Result

  • container is not created (docker ps -a)
  • service is created. However, replicas 0/1 (docker services ls)

while testing, I found If I processed the ports as commnets, It works.


Is there what the problem is?

I also investigated the overay network.
However, in this network I can not find the container ip.

What is the output of docker stack ps monitor --no-trunc?