#GitHub - FoerMaster/garrysmod-to-docker:...
1 messages · Page 1 of 1 (latest)
Quite nice, though I think in this case youd want your image published on a public container registry (could be the github one), because cloning a repo to run the image defeats the purpose IMO
does it handle gmod updates fine? also can I switch to different branches? anyway awesome work!
The image is already published and available in the GitHub Container Registry:
image: ghcr.io/foermaster/gserver-docker-source:main
The current repository is a boilerplate and serves as a base template for further development and server configuration.
no longer having to deal with installing servers is a good thing 
I completely forgot about branch switching.
At the moment, only the main branch can be launched.
However, I will definitely add other images.
does it have to be a different image?
im not an expert with docker, but if it can be like just GMOD_BRANCH in env then it would be awesome/easy
I decided to abandon the idea of running SteamCMD every time before starting the server, so I wrote a script that monitors the current Garry’s Mod server build and automatically builds new images (versions) when an update is detected.
I hope this will actually turn out to be a useful tool. In the future, I plan to add automatic Lua code minification to obfuscate it from ScriptHook and to optimize bundle size.
man imagine having to keep checking which one to update ur one
Since this is a Docker container, I expect users to handle updates themselves.
I’ll still print a message in the console when the image needs to be updated.
As a fallback, I can add a start.sh that always runs:
docker pull ghcr.io/foermaster/gserver-docker-source:main
if its possible, could have an interval option, to check like every x for updates, if theres anything to save states in?
to also have updating and avoiding the steamcmd run every single time
GMOD_AUTO_UPDATE (default = false):
GMOD_AUTO_UPDATE_INTERVAL (default = 1d):
i mean this mostly stems from the fact players cant play anything but an updated version of gmod but idk
personally when i update servers i already have to ssh ec
I mean dev branch would be annoying to keep up with lol
so changing the number of the image doesnt seem far fetched
Yeah, this can be added. I’d really appreciate it if you could write this up as an issue 🙂
I think a seamless server update is possible, but players would still need to reconnect anyway.
yes and in most cases theyd need to update themselves
You only need to change the tag, and the version will always be pulled as the latest.
main branch: ghcr.io/foermaster/gserver-docker-source:main
(future example for dev branch: ghcr.io/foermaster/gserver-docker-source:dev-branch)
why not just dev
me changing it from main to dev, no image, wtf is happening?
oh I have to add -branch

would it be possible to also add like a flag to select a specific gmod version?
main-352352
dev-35325
i mean im thinking it can just be a github action that trigers whenever a gmod update is published fetches the new update on all branche and publishes main-20.1.5 dev-20.1.5 etc
I wrote that the -dev branch doesn’t exist yet
it will be added in the future with an update.
I just meant the name lol
oh :)
anyway this all looks cool, branch/autoupdate/specific version is gonna be like full package to use it
Thanks!
I’ll be working on updates and adding new features this week!
btw how are addons supported, do you mount a volume?
or is it fully within the image
Just create an addons folder inside the src directory and drop your addons there.
You mean how addons and other files actually get into the server itself?
yea
Ah, sorry.. I didn’t fully understand your question at first. Here’s how it works:
The src directory is mounted into the container and synced with an internal upd directory. A dedicated script periodically monitors this folder for any changes.
When new files appear or existing ones are modified, they are automatically copied into the game server directory, replacing the current versions.
If you modify a file that originally belongs to the server build, its original version is backed up first. Your modified file is then used, and if it gets removed, the original file is automatically restored.
🤔