Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HEALTHCHECK in Dockerfile

Is having HEALTHCHECK NONE in Dockerfile same as not specifying HEALTHCHECK in Dockerfile ?

I can't seem to find any documentation about this. Would appreciate any pointers around this

like image 932
user89978 Avatar asked Nov 15 '25 08:11

user89978


1 Answers

According to Docker reference documentation: https://docs.docker.com/engine/reference/builder/#healthcheck

HEALTHCHECK NONE (disable any healthcheck inherited from the base image)

So the answer in no - it is not the same. If you code the line in your Dockerfile - you also disable (if present) any healthchecks provided from your base image.

So imagine you built your image on top of other image (suppose node alpine), then- if node alpine image would have HEALTHCHECK ... configured in its Dockerfile, then doing HEALTHCHECK NONE in your dockerfile - disables the origin healthcheck.

like image 171
Tal Rofe Avatar answered Nov 17 '25 21:11

Tal Rofe