-
Notifications
You must be signed in to change notification settings - Fork 86
Rework Dockerfile, Rework Scripts, Rework ENV/Config, add k8s examples #77
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
base: main
Are you sure you want to change the base?
Conversation
|
This works with current users. |
|
Hey! Thanks for your feedback, I removed the quotes in the docker-compose.yml file, granted I haven't tested that one, podman and kubernetes do not seem to behave like this. Apparently Docker compose takes anything behind the "=" in the environment section very literally :D I also removed the STEAM_USER_UID and STEAM_USER_GID env vars. I intentionally left the out of the README already because I didn't really see a reason to change them, but I kept them in the Dockerfile for no apparent reason. I guess it's worth mentioning that this container will run as user 1000:1000 by default, if Docker Compose creates folders, make sure you either run it as user 1000:1000 or change the owner of your bind mount folders accordingly. I added this to the docs. As for the "breaking" changes: I suppose it is breaking in the sense that existing users need to adjust their env vars accordingly, as well as their compose file or docker arguments. If someone just uses ":latest" and pulls the image, they will get a whole new server. Therefore this should probably be a major version jump, if it gets merged. I decided to add an "OVERRIDE_CONFIG" default "true" parameter, to allow people to manually edit their configs and keep the changes, instead of using env vars. PS: Also added actual log rotation, logs are now rotated daily. And by default deleted after 30 days. |
Add arg for changing user and group id
Added example for new args
|
panromir#1 |
Remove context as it defaults to . anyway. Add image to example.
Fix ARGs, reduce layers
Improve build instructions for custom UID/GID
|
Thanks! I think the Dockerfile-based solution that you suggested is preferable, since running a container rootless is good practice. |
|
Done. If we further want too, we could also change the CLI example due to using expose in the Dockerfile. to |
Add build argument for allowing the user to change steam user and group ID
|
I didn't even know about -P until now, however what I don't like about that solution is that the ports are random within a certain range, so I think -p is the better (or at least less confusing for newcomers) way. |
|
Ah, missed that part. On the documention for expose it doesn't mention that, but for the correct page of -P does. Yeah that just gets confusing. Good for if you just don't want the default ports. Bad for if your new to docker or can easily forget -P uses a random host port. Yeah better to avoid it. |
|
I added supervisord as a kind of "child process manager". Usually in k8s I would add a recurring job to rotate the logs, in Docker I have to use supercronic if I want to run the container in rootless mode, or I have to use an external process automation, which makes it more difficult to use for beginners. Since supercronic need to run in the background and I want the container to restart if I did it this way. If supervisord is not desired, I preserved the old state in another branch. There however, logs are not properly rotated automatically due to the lack of cron. |
Account for spaces
Account for spaces
This already accounts for spacing
-serverName and -saveName override config parameters, which isn't necessary, since the server config is managed anyway, so keeping this in one place is preferable.
Keep this as it was originally and change the default save name to "world1" as is default. The README will be improved by making very clear, that OVERRIDE_CONFIG=true always purges all manual changes to configs on restart.
Account for spacing and changing default Dockerfile env
|
@TrueOsiris have you had an opportunity to check this out yet? |
Is the user change to 1000:1000 already live? My files are being created as root and then the autosave cleanup doesn't work |
No it's not. Git pull from https://github.com/panromir/docker-vrising/tree/main |
|
Perfect, thank you |
Not yet to be honest. But as it holds stuff on kubernetes, I will, somewhere in time, have a look at this pull request. |
|
Can we flesh out the docs a bit more on this to show the various allowed options for each config variable? Would be nice for newcomers to be able to know what the available config options are for example GAME_SETTINGS_PRESET what are the other options? This might be beyond the scope of this particular effort but it would be a nice additional good to have! |
|
I also do not see the point of 2 specific bind mounts here /home/steam/vrising is the parent of both the folders we should be able to just have that as the single mount point. |
|
Something of interest with how the PV/C is working with this container I usually use an NFS storage class for kubernetes workloads, and for some odd reason I can see the folders when looking at my NFS mount but they are empty. When looking in the pod however all the data is there... not sure what is causing that. |

A Process-State based Healthcheck has been added (mainly for k8s - can also be used for Docker image formats, not for OCI images)
The Dockerfile has been rewritten completely and is now based on the "officialy" endorsed steam-cmd image (and therefore Debian bookworm)
The PV/Mount paths have therefore also changed
It's now hadolint safe (except version pinning)
The configuration now uses envsubst. This makes configuration by environment variables MUCH easier and more extensible - no manual fiddling with config files anymore
Not sure if the config mount needs anything else. If this is all that's saved to Persistent Data Path (not Server Files) we can also consider removing that Mount entirely. Config files are automatically generated at runtime and logs should always go to stdout anyway, given the option to mount them somewhere else or send them to logging via sidecar
I added examples for Kubernetes (kustomize) - I'm running a version of this in my personal cluster and it works fine
The New Docker image is pretty large, not sure if all the packages I install are strictly necessary - WINE Sucks for hosting headless Gameservers, I hope they release a linux-native version soon :(
The container image now runs rootless
PLEASE NOTE: MANY OF THESE CHANGES ARE BREAKING FOR CURRENT USERS