Jump to content

Adding a healthcheck to a docker image?

Recommended Posts

I have a docker image (qbittorrent) with a vpn built in that I use. It works great, EXCEPT that every couple of days, the vpn dies. The WebUI still works fine, but you can't curl to any address from the command line, and i get a notice from some sites that i'm no longer seeding.


I did some digging on this and found a thing people can add to their docker image called a healthcheck? Sorry if this is obvious, i'm very new to docker and unraid.


Basically you'd add something like:

      test: ["CMD-SHELL", "curl -f http://google.com || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 5


I have no idea how to add that to a docker image i got from the community. Plus, if I add it, will it get wiped out the next time I go into the docker settings and re-apply?


Searching here and elsewhere hasn't provided much help. Is this an option for me?

Link to comment
  • 2 weeks later...

They said in "Extra Params or something like that" you can just "drop in all the docker CLI stuff"


which is helpful if you know exactly what that means.

I'm unclear what the docker command line stuff would be, but I believe they're referring to the Extra Parameters section.


This section (for this container) already has a few parameters there, in the format:

--param=VALUE --secondparam=SECOND_VALUE


I have no idea what precisely to put here to add a healthcheck.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...