Docker Community Forums

Share and learn in the Docker community.

Dcoker container Replicas

Im trying to create container replicas but it is not creating??

welcome aboard!

please share the output of docker service ps getstartedlab_web --no-trunc

Please also share the output of docker version and the content of your docker-compose.yml

There must be a reason why the scheduled tasks are pending. Hint: if you wait long enough the instance should be aborted and docker service ps should provide a hint about the error.

‘Docker service ps’ command when i execute it showing requires atleast 1 argument

Seems like i was not clear enough on docker service ps. Of course I ment the full command two post ago.

The output of docker version indicates a problem with your docker deamon. Please re-run the command as root and paste the output.

I am still waiting for your compose.yml.

version: “3”
services:
web:
# replace username/repo:tag with your name and image details
image: sateeshbangarugiri/get-started:part1
deploy:
replicas: 10
resources:
limits:
cpus: “0.1”
memory: 50M
restart_policy:
condition: on-failure
ports:
- “4000:80”
networks:
- webnet
networks:
webnet:

docker-compose.yml contents!!

I asked you to rerun the command as root! Either do sudo -i and retry your commands or add sudo in front of your commands.

Nothing in your docker-compose.yml is the reason the replicas do not start. I pasted it, strucuted it properly and ran it: it works.

The problem is with your docker engine and/or host os.

I ran those commands in root mode…i did ‘sudo su’…it changes to root@sateesh…see in screenshot

You are right. Sorry, should have taken a closer look. The error messages (typicaly from running docker commands as an unpriviliged user not beeing in the docker group) made me skip details.

Are you sure the docker service is started?
Please try service docker start as root and then retry the commands.


This error is coming often to me!!

Actually i want to simulate distributed system using docker containers??