ghusta / docker-postgres-world-db

Example Database for PostgreSQL : World DB
40 stars 33 forks source link

Add HEALTHCHECK in Dockerfile #2

Closed ghusta closed 6 years ago

ghusta commented 6 years ago

Add a Docker Healthcheck to the Dockerfile. See this example : https://github.com/docker-library/healthcheck/tree/master/postgres

Reference :

ghusta commented 6 years ago

To test HEALTHCHECK command in image :

docker inspect --format="{{json .Config.Healthcheck}}" IMAGE_ID

To test HEALTHCHECK status in container :

docker inspect --format="{{json .State.Health.Status}}" CONTAINER_ID