View logs and debug a docker service

To debug why a container within a docker stack didn’t start, these commands will help

[bash]

#list all processes

docker service ls

#note the id of your problematic service

docker service ps <problematic-service-id-from-above>

#lists all containers of this service. note the id of the most recent container

docker inspect <container-id-from-above-step>

[/bash]

Sreekumar Kj
Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics. He now runs a conversational AI company - DheeYantra - focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.