# \[solved\] Pihole Docker container unhealthy

**URL:** <https://discourse.pi-hole.net/t/solved-pihole-docker-container-unhealthy/17939>\
**Category:** docker\
**Created:** [March 3, 2019, 9:27am UTC](https://discourse.pi-hole.net/t/solved-pihole-docker-container-unhealthy/17939 "2019-03-03T09:27:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattMan](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mattman/32/8751_2.png) [@MattMan](https://discourse.pi-hole.net/u/MattMan)\
**Post date:** [March 3, 2019, 9:27am UTC](https://discourse.pi-hole.net/t/solved-pihole-docker-container-unhealthy/17939/1 "2019-03-03T09:27:40Z")

</div>

Hi, solved my own question but writing it up in case it helps others.

Was struggling with this for a while and it seemed to get worse with the latest build/container,  
Environment is Debian Linux and Docker CE running in a VM. After a VM reboot, Pihole container would on occasionally become unhealthy. Didnt happen every time but was becoming unreliable.

Updated to the latest Pihole container and could not run the container for more than 5 mins.

Turns out, the health check is doing this  
HEALTHCHECK &{["CMD-SHELL" "dig @127.0.0.1 pi.hole || exit 1"] "0s" "0s" "0s" '\x00'}  
I tried this  
dig @127.0.0.1 pi.hole  
on the Docker host and the container itself which failed.

Ended up creating a hostname (pi.hole 192.168.4.168) on my internet router pointing to the IP of the Pihole container so that the health check command wouldn't fail.

Im not a Docker guru so maybe i am working around a different issue but at least it is solved!

cheers.

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [March 3, 2019, 9:40am UTC](https://discourse.pi-hole.net/t/solved-pihole-docker-container-unhealthy/17939/2 "2019-03-03T09:40:25Z")

</div>



---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [May 21, 2019, 5:19am UTC](https://discourse.pi-hole.net/t/solved-pihole-docker-container-unhealthy/17939/3 "2019-05-21T05:19:30Z")

</div>


