docker service replicas remain 0/1 -


i trying out docker swarm 1.12 on mac. started 3 virtualbox vms, created swarm cluster of 3 fine.

docker@redis1:~$ docker node ls  id hostname status availability manager status 2h1m8equ5w5beetbq3go56ebl    redis3  ready active  8xubu8g7pzjvo34qdtqxeqjlj    redis2  ready active reachable  cbi0lyekxmp0o09j5hx48u7vm *  redis1  ready active leader 

however, when create service, see no errors yet replicas displays 0/1:

docker@redis1:~$ docker service create --replicas 1 --name hello ubuntu:latest /bin/bash 76kvrcvnz6kdhsmzmug6jgnjv docker@redis1:~$ docker service ls id            name   replicas  image          command 76kvrcvnz6kd  hello  0/1       ubuntu:latest  /bin/bash docker@redis1:~$ docker ps container id        image               command             created             status              ports               names 

what problem? logs? thanks!

the problem tasks (calling bin/bash) exits since it's not doing anything.

if @ tasks service, you'll see 1 started , shutdown within seconds. 1 started, shutdown , on, since you're requested 1 task running @ times.

docker service ps hello 

if use ubuntu:latest top instance, task stay running.


Comments