Use docker inspect
is different in swarm
mode and normal
mode if you wnat to use it in swarm
mode:
-
Manager nodes: use this command for services. (but if you want to see healthceck logs of specific container see worker nodes section):
docker inspect --format "{{json .Spec.TaskTemplate.ContainerSpec.Healthcheck }}" hinava_dashboard |jq
-
Worker nodes: you should use complete name of the container that completed with
<tab>
key
docker inspect hinava_filebeat.1.umvobmm9wrjdz1b08y5jibvl2 | grep -B 10 -A 10 "health"