Query docker container stuff

  • Post Author:
  • Post Category:IT
  • Post Comments:0 Comments

Add the following to Dockerfile:

HEALTHCHECK –interval=10s –timeout=3s CMD curl -s smtp://localhost/ || exit 1

$ docker inspect –format “{{.State.Health.Status}}” 0dbed54e70cc
healthy

$ docker inspect –format “{{.State.Status}}” 0dbed54e70cc
running

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.