-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump base to ubuntu 22.04 and use jq for healthcheck #282
Conversation
428570c
to
4abfe04
Compare
Ubuntu 18.04 (Bionic) is unmaintained and marked as EOL since May 2023. The issue with the `ubuntu` (PID 1000) user was introduced in Ubuntu 24.04 (Noble). Signed-off-by: Tan Siewert <[email protected]>
The use of `grep` requires the HTTP server to return the JSON body in one line. This could change with an update (either intended or not) and would break the healthcheck. Instead, we should parse the JSON and exit with code 1 if the health is not healthy. Signed-off-by: Tan Siewert <[email protected]>
4abfe04
to
2992559
Compare
Actually, no 🙈 I ran into the "uid 1000" issue myself for another service using the |
@tomsiewert have you tested this for the permissions issues mentioned in the other threads? |
Just a general question regarding security and dependencies. I am all for updating the base image to a higher ubuntu version, maybe even 24? |
@LevantinLynx please read the related issues regarding Ubuntu 24. Regarding |
@wolveix I haven't triggered this issue so far and wasn't really able to re-produce it. If you have a reproducer I'd be happy if you can share it!
As described in my commit message, the grep approach requires the string to be exact like that to match for the health check. If the game server suddenly starts to return multiline JSON or a slight different formatted JSON body, the health check would (always) fail. |
Don't want to derail this PR, but is there a reason for using Ubuntu, as opposed to Debian, at all for a Docker image? |
@schildbach usually Debian is my first choice! I seem to recall there being a reason for us using Ubuntu instead of Debian, but that decision would have been years ago and I'd have to do some digging :) |
@tomsiewert @natewalck could you test |
I'm not seeing this in a github branch, but I can try it on docker in a bit. Currently I'm on the latest docker image and its been working great. |
@natewalck it's from DockerHub, the tag is there :) I'd appreciate it if you could give it a go, as you had issues with the previous image, so I'm curious for your usage specifically. Make sure to backup your saves etc. first! |
If the current image is working well, what is the use case for this one? Going back to modern Ubuntu? I have friends playing on the server and I am loathe to change it atm. I can try spinning up a fresh server on another host and test it there. |
@natewalck because Ubuntu 18 is EOL. I believe the issue you experienced was with Ubuntu 24, and I'm interested in trying it on your same server given that it's an isolated issue. I understand if you'd rather not, but it'd be incredible if you could spend just 10 minutes trying it |
I'm not natewalck, but I did do a quick test. Moving from
|
Thank you for confirming, @Zenkala! I'm particularly eager for anyone who reported issues before to test it. The issues with Ubuntu 24 were due to the users, but we had issues even when bumping to Ubuntu 20 in the past (if memory serves right). That was due to host Docker versions, but I wanted to try and verify that this isn't the case with Ubuntu 22 now. |
Ah I see. Well it works with Docker version 27.1.0, build 6312585. Hope we get more people to test it. |
Thanks everyone :D No complaints so far 👀 |
I tried to test this, it said it does't exist. I assume this is just in main now, so I'll update my base. |
This patch series focuses on two main improvements:
Bump the base image to Ubuntu 22.04, because Ubuntu 18.04 has reached its end-of-life in May 2023 and shouldn't be used in new images anymore.
Improve the healthcheck by using
jq
instead ofgrep
.