docker service replicas remain 0/1

The problem is that your tasks (calling bin/bash) exits quickly since it’s not doing anything.

If you look at the tasks for your service, you’ll see that one is started and then shutdown within seconds. Another one is then started, shutdown and so on, since you’re requested that 1 task be running at all times.

docker service ps hello

If you use ubuntu:latest top for instance, the task will stay up running.

Leave a Comment

tech