1

Similar to this question, but with the intricacies of the docker stack added.

While debugging short lived containers on vanilla docker is "easy", you just do docker logs -f "failed_container_id", how can I do the same for containers started via docker stack?

I tried the following but none work:

docker logs -f stackname_containername

docker logs -f stackname_containerid

docker logs -f containername

docker logs -f containerid

All of these attempts result in

Error response from daemon: No such container: XXXX

I also tried looking at the output of docker stack services stackname as suggested by my local friendly chatbot and using the service's id in the command docker service logs stackname_servicename but this just outputs nothing.

So how is it that I can see logs fine with "regular" docker containers but not with the ones started as part of a stack?

0 Answers0