I have a problem with my docker swarm. I created a new service with the following command:
docker-compose config | docker stack deploy -c - serviceNameX --with-registry-auth
The docker-compose file looks like that:
version: '3.1'
services:
serviceNameX:
image: ${DOCKER_REGISTRY}imageNameX:${VERSION}
deploy:
resources:
limits:
memory: 2gb
env_file:
- ../common.env
- .env
networks:
default:
external:
name: ${DOCKER_NETWORK}
fyi: docker-compose config is used because docker stack deploy can't expand environment variables. At least to my knowledge.
docker service ps serviceNameX
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
ify7vhl0l2m8 serviceNameX.1 nexus.local/imageNameX:1 Running New 2 hours ago
docker service ls
afnjo97f6nuf serviceNameX replicated 0/1 nexus.local/imageNameX:1
All nodes are Ready and Active
There is no indication or information of an error. Usually docker service ps shows if an error occurs. Is there another useful log?
docker events
,docker service inspect
, anddocker container inspect
(on that ify7vhl0l2m8). I'd also do awatch docker service ps serviceNameX
to see if tasks were re-spawing but indeed it's weird to see a single task "running" but a 0/1 in service ls. – Bret Fisher Mar 23 '18 at 3:56