April 3, 20242 yr 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: healthcheck: 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?
April 3, 20242 yr I would suggest posting this question in the support thread for the docker in question.
April 16, 20242 yr Author 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.
September 27, 20241 yr In extra parameters. --health-cmd='curl -fSs http://google.com > /dev/null || exit 1' --health-interval=10s --health-retries=3 --health-timeout=5s --health-start-period=20s You can then run another container called autoheal, which will restart any unhealthy containers. Enjoy. Edited September 27, 20241 yr by petersem
January 5Jan 5 On 4/17/2024 at 4:23 AM, theothermatt_b said: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.Sorry to revive an old thread, but just in case anyone else comes across this topic (as I'm was also trying to work this out today in UNRAID > Docker area).Provided you already have docker enabled and some docker containers installed, go to Docker tab (top menu bar of UNRAID) > click on the name of the docker container you want to add a health check parameter for > this should open the containers config settings > in the top right hand corner (along the 'update container' heading) click the 'Basic View' toggle to switch to 'Advanced View' > You will now see additional fields, one of which is 'Extra Parameters:'). Put your health check command and it's parameters in there.
January 11Jan 11 I am a noob in this topic, but I found out that not every docker container has curl, like some alpine based containers.I replaced the extra parm command to use wget for these containers:--health-cmd="wget --no-verbose --tries=1 --spider http://1.1.1.1 || exit 1" --health-interval=100s --health-retries=3 --health-timeout=30s --health-start-period=60sI also replaced google with 1.1.1.1 so it's not affected by a dns problem
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.