gameservermanagers / linuxgsm-docker Goto Github PK
View Code? Open in Web Editor NEWThe Official LinuxGSM Docker image (experimental)
Home Page: https://linuxgsm.com
License: MIT License
The Official LinuxGSM Docker image (experimental)
Home Page: https://linuxgsm.com
License: MIT License
you till need to add the following missing items to your docker file
sudo apt install netcat lib32stdc++6 steamcmd
Hi everyone, first of all thanks for this work, I'm using LinuxGSM-Docker on an OMV server to host a Valheim server (great game!) and I have 2-3 technical questions.
First, I noticed that there is no "vi" or "nano" to edit my configuration files so I would like to install it but the account is not root... Could you please give me the root password so that I can make this addition and recreate an image for me?
Then there is something I don't understand. Why do I need to mount the next volume on my host when the "/home/lgsm" directory of the image is useless?
-v /path/to/lgsm:/home/lgsm/
I wanted to mount "-v /path/to/lgsm:/home/linuxgsm" instead to have a direct access to the tree from my host machine but even by doing the "chown -R 750:750" on the associated directory I can't execute the ./vhserver command on my container anymore... What I don't miss or understand ?
Thank you!
While running the machine and trying to start anything we receive the following error:
[ FAIL ] Viewing details (servertype): Ownership issues found Information! The current user (linuxgsm) does not have ownership of the following files: User Group File root root /home/linuxgsm/serverfiles root root /home/linuxgsm/serverfiles/logs root root /home/linuxgsm/serverfiles/test
It is impossible for these file shares to change their ownership after creation, so the owner remains root, however access is still given, why is it important who is the owner for the folder?
While the limitation of the used SMB protocol is not an issue to be solved by LinuxGSM, it also calls into question why a non-root user is being used? Usually containers just run in root.
After the latest update on 19 of January 2023 (digest 11cd7e3a273f), the Unraid OS can no longer get the manifest to determine the version of the container. After some research, this is what Unraid receives:
{"errors":[{"code":"MANIFEST_UNKNOWN","message":"OCI index found, but accept header does not support OCI indexes"}]}
Edit: I have purposed a fix on the Unraid forums about this. It is not an error of this project.
https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server
Example:
RUN apt-get install -y \
software-properties-common \
python-software-properties && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update -y
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN apt-get install -y oracle-java8-installer oracle-java8-set-default
as the title states - a server with the name l4d2server
is created correctly
but a server with the name l4d2server-2
does not get created
I'm following instructions from the guide as seen here:
https://docs.linuxgsm.com/features/multiple-game-servers
this is my log output:
l4d2server-2 | loading exit trap
l4d2server-2 | Welcome to the LinuxGSM Docker
l4d2server-2 | ================================================================================
l4d2server-2 | GAMESERVER: l4d2server-2
l4d2server-2 | UID: 1000
l4d2server-2 |
l4d2server-2 | LGSM_GITHUBUSER:
l4d2server-2 | LGSM_GITHUBREPO:
l4d2server-2 | LGSM_GITHUBBRANCH:
l4d2server-2 |
l4d2server-2 | Initalising
l4d2server-2 | ================================================================================
l4d2server-2 | update permissions for linuxgsm
l4d2server-2 | creating ./l4d2server-2
[ FAIL ] unknown game server
l4d2server-2 | starting cron
l4d2server-2 |
l4d2server-2 | update l4d2server-2
l4d2server-2 | ./entrypoint.sh: line 54: ./l4d2server-2: No such file or directory
l4d2server-2 |
l4d2server-2 | start l4d2server-2
l4d2server-2 | ./entrypoint.sh: line 58: ./l4d2server-2: No such file or directory
l4d2server-2 | ./entrypoint.sh: line 60: ./l4d2server-2: No such file or directory
I created a fork to create a docker-compose example , and I am trying to figure out an easy maintainable solution permission wise.
https://github.com/takov751/LinuxGSM-Docker
So far what seems to be a promising solution for that is that we would run before starting up docker-compose
as in the description with one extra step
sudo groupadd -g 750 lgsm && sudo usermod -aG lgsm $USER
inside the docker-compose we could use the function called `group_add:
I did this over the weekend and wanted to share with Linux GSM devs. Thanks again for maintaining a docker image and making dedicated server management easy.
https://github.com/samrocketman/docker-compose-lgsm-rust-dedicated-server
I'll close this issue tomorrow once some devs had a chance to see it.
Please add tags to your images at https://hub.docker.com/r/gameservermanagers/linuxgsm-docker/tags
We would like to use the provided image but relying on "latest" isn't really great since this could mean that our image breaks from one day to another if you guys add/change something about your image.
I know Docker isn't yet officially supported but I think this would already be a great step forward.
The Dockerfile attempts to add the linuxgsm
user twice. It also attempts to switch to the newly-created linuxgsm
user without changing the CWD from /
and download the linuxgsm.sh
script, which fails due to lack of write privileges.
See the following output from an attempt to run docker build .
Step 8/17 : USER linuxgsm
---> Running in 48c2517e43af
Removing intermediate container 48c2517e43af
---> f2db13db51a8
Step 9/17 : RUN wget https://linuxgsm.com/dl/linuxgsm.sh
---> Running in 10d242ef3015
--2020-06-09 00:19:57-- https://linuxgsm.com/dl/linuxgsm.sh
Resolving linuxgsm.com (linuxgsm.com)... 104.28.8.207, 104.28.9.207, 172.67.171.119, ...
Connecting to linuxgsm.com (linuxgsm.com)|104.28.8.207|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/linuxgsm.sh [following]
--2020-06-09 00:20:37-- https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/linuxgsm.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.192.133, 151.101.64.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14063 (14K) [text/plain]
linuxgsm.sh: Permission denied
Cannot write to ‘linuxgsm.sh’ (Success).
The command '/bin/sh -c wget https://linuxgsm.com/dl/linuxgsm.sh' returned a non-zero code: 3
ip="192.168.1.150
maxplayers="24"
fn_parms(){
parms="-game cstrike -strictportbind -ip 0.0.0.0 -port ${port} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} +sv_lan 1 -nohltv"
}
version: '2'
services:
linuxgsm-css:
image: linuxgsm:latest
container_name: linuxgsm-css
networks:
enp1s0f0_vlan:
ipv4_address: 192.168.1.150
volumes:
- linuxgsm_css_vol:/home/lgsm
restart: unless-stopped
networks:
enp1s0f0_vlan:
driver: macvlan
driver_opts:
parent: enp1s0f0
ipam:
config:
- subnet: 192.168.1.0/24
volumes:
linuxgsm_css_vol:
driver_opts:
type: none
device: /srv/quickload/docker-volumes/linuxgsm/css-server
o: bind
I am getting the above error when trying to start any linuxgsm container for the past 5ish days.
steamcmd is missing in dockerfile and is needed as a dependency for vhserver.
I'm currently implementing a possible fix on my local DockerFile that y'all gave me to see if that resolves the issue. But seems that the wget attempts to download gets a 301 redirect and begins downloading it, but on this attempt it fails because of permission Denied. Technically it should be on /home/linuxgsm to do the download, but I'm currently doing a force using -O to see if that resolves the issue. I'll keep you guys updated.
The error has been provided. This error prevents the creation of the docker image. And I'm still consider a novice to docker development so not sure how to enter a docker that is not running and fails to run lol.
I will increase the distro to Ubuntu 20.04
Been a bit since I had to mess around but 7D2D A21 dropped this afternoon
Using 'container console' via Porttainer & attempting to utilize some (all?) of the server command indicates an error in the 'info_game.sh' script file
linuxgsm@4e085af0701e:~$ *server start
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 134: unexpected EOF while looking for matching `''
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 135: syntax error: unexpected end of file
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 134: unexpected EOF while looking for matching `''
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 135: syntax error: unexpected end of file
[ OK ] Starting sdtdserver: NOT SET
linuxgsm@4e085af0701e:~$ *server restart
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 134: unexpected EOF while looking for matching `''
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 135: syntax error: unexpected end of file
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 134: unexpected EOF while looking for matching `''
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 135: syntax error: unexpected end of file
[ .... ] Stopping sdtdserver: NOT SET/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 134: unexpected EOF while looking for matching `''
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 135: syntax error: unexpected end of file
[ OK ] Stopping sdtdserver: Graceful: telnet: 127.0.0.1:8084 : OK
[ OK ] Stopping sdtdserver: NOT SET
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 134: unexpected EOF while looking for matching `''
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 135: syntax error: unexpected end of file
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 134: unexpected EOF while looking for matching `''
/home/linuxgsm/lgsm/modules/info_game.sh: eval: line 135: syntax error: unexpected end of file
[ OK ] Starting sdtdserver: NOT SET
linuxgsm@4e085af0701e:~$
Confirmed the game_info is good by running the 'lgsm-update' command (1st couple of rows in the screenshot)
I trying with rust server but given one or some error.
tmux
wget
ca-certificates
file
bsdmainutils
util-linux
python
bzip2
gzip
unzip
binutils
bc
jq
lib32gcc1
libstdc++6:i386
lib32z1
Information! Required dependencies already installed
mkdir: cannot create directory ‘’: No such file or directory
fetching steamcmd_linux.tar.gz ...ERROR
mkdir: cannot create directory ‘’: No such file or directory
fetching ...FAIL
version: '2'
services:
linuxgsm-css:
image: linuxgsm:latest
container_name: linuxgsm-css
ports:
- "27015:27015"
volumes:
- linuxgsm_css_vol:/home/lgsm
restart: unless-stopped
volumes:
linuxgsm_css_vol:
driver_opts:
type: none
device: /srv/quickload/docker-volumes/linuxgsm/css-server
o: bind
Commands run on the container:
./linuxgsm cssserver
./cssserver ai
./cssserver m output
lgsm@c3fd5fa96cc6:~$ ./cssserver m
[ INFO ] Monitor cssserver: Check IP: 172.21.0.3
[ OK ] Monitor cssserver: Checking session: OK
[ OK ] Monitor cssserver: Querying port: gsquery: 172.21.0.3:27015 : 0/1: OK
I was thinking while looking at the code. Would it be a more friendly construction to have a Linuxgsm docker with docker privileges and then each game server would be a separated docker managed by the main linuxgsm container . I perfectly understand that would be a fundamental change, which might not be ideal due it would me to rebase the whole project with different principals in mind . I was just interested in you contributors though
When running docker image and running container it shows errors in entrypoint.sh file:
entrypoint.sh: line 2: $'\r': command not found
entrypoint.sh: line 3: syntax error near unexpected token $'{\r'' 'ntrypoint.sh: line 3:
exit_handler () {
The command for docker in the readme needs to be updated to point to the correct image on DockerHub:
docker run --name lgsm-docker --restart always --net=host --hostname LGSM -it -v "/path/to/lgsm:/home/lgsm/" gameservermanagers/linuxgsm-docker
https://github.com/joshhsoj1902/linuxgsm-docker
He has been working on docker support for GSM for a while now you should see if you guys could work together
Hello,
This project is based upon my project hosted here:
https://github.com/akshmakov/LinuxGSM-docker
In this commit the original contributor kept my code but removed my copyright notice.You can see this edit here.
I request that the copyright be corrected and my contribution be aknowledged or this repository taken down. Thank you.
pzserver | exec /usr/bin/tini: no such file or directory
Setting up a Project Zomboid dedicated server & all seems to be running well.
Only gripe I have is the log path that's TAIL'd via 'entrypoint.sh' is LGSM's...the 5min MONITOR log
What I see today:
...
Aug 28 18:05:13.657 pzserver: MONITOR: INFO: * Server CPU Model: AMD Ryzen 3 3100 4-Core Processor
Aug 28 18:05:13.659 pzserver: MONITOR: INFO: * Server CPU Frequency: 3600.000
Aug 28 18:05:13.660 pzserver: MONITOR: INFO: * Server RAM: 32GB
Aug 28 18:05:13.661 pzserver: MONITOR: INFO: * Server Disk: 196G
Aug 28 18:05:13.667 pzserver: MONITOR: INFO: LinuxGSM version: v22.1.0
Aug 28 18:05:13.668 pzserver: MONITOR: PASS: core_exit.sh exiting with code: 0
...
Would be optimal, to me, to be able to utilize an ENV variable, instead of redirecting/merging the .../Zomboid/Logs via VOLUME into the LGSM 'log/script' folder (hacky, but SHOULD work)
FROM:
./${GAMESERVER} details
tail -f log/script/*
# with no command, just spawn a running container suitable for exec's
TO:
./${GAMESERVER} details
tail -f {LOGPATHTOTAIL}/*
# with no command, just spawn a running container suitable for exec's
...unless I'm missing something quiet obvious (Docker being still relatively new for me)
Hey Ho,
I managed to run factorio, ark, 7D2D and arma3 within docker.
I saw that you started working on "dockerizing" lgsm. I have some experience with docker so far and would like to help.
Since I dont know how to contact you via Github, I do it by creating this issue.
What I did so far is to create an base-image and build docker container for each server on top of it. If you are interested I can share my work with you.
Feel free to contact me =) I would like to help as much as I can!!
Best,
Avendretter
Hello. My gameserver has next settings
Server = Counter-Strike 1.6
ip="0.0.0.0"
port="27015"
clientport="27005"
defaultmap="de_dust2_2x2"
maxplayers="32"
startparameters="-game cstrike +ip {port} +map {servercfg} -maxplayers ${maxplayers}"```
My docker-compose
version: '3.4'
services:
linuxgsm:
image: "ghcr.io/gameservermanagers/linuxgsm-docker:latest"
container_name: csserver
environment:
Game server correctly work and set position success on masterlist game.
But... When i can try added server custom web monitroing. Server is offline.
$ ./csserver debug
Counter-Strike 1.6 Debuging
Distro: Ubuntu 20.04.5 LTS
Arch: x86_64
Kernel: 5.4.0-28-generic
Hostname: 8590ae43ea58
tmux: tmux 3.0a
Avg Load: 0.03, 0.04, 0.02
Free Memory: 3.0GB
Free Disk: 71G
glibc required: 2.14
Game Server IP: 0.0.0.0:27015
Internet IP: 23.111.202.173:27015
Server password: NOT SET
Start parameters:
./hlds_run -game cstrike +ip 0.0.0.0 -port 27015 +map de_dust2_2x2 +servercfgfile csserver.cfg -maxplayers 32 -debug
Use for identifying server issues only!
Press CTRL+c to drop out of debug mode.
Warning! If csserver is already running it will be stopped.
Continue? [Y/n] Y
[ INFO ] Debuging csserver: Stopping any running servers
[ OK ] Stopping csserver: Graceful: sending "quit": 3: OK
[ OK ] Stopping csserver: Классика с нами [https://github.com/GameServerManagers/LinuxGSM/issues/1] [vk.com/classicwithus]
[ OK ] Debuging csserver: Starting debug
Enabling debug mode
./hlds_run: 125: test: Illegal number: unlimited
./hlds_run: 1: gdb: not found
Please install gdb first.
goto http://www.gnu.org/software/gdb/
Auto-restarting the server on crash
Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 19:52:19 Aug 3 2020 (8684)
STEAM Auth Server
Server IP address 0.0.0.0:27015
Metamod version 1.21.1-am Copyright (c) 2001-2013 Will Day [email protected]
Metamod comes with ABSOLUTELY NO WARRANTY; for details type meta gpl'. This is free software, and you are welcome to redistribute it under certain conditions; type meta gpl' for details.
AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team
AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
This is free software and you are welcome to redistribute it under
certain conditions; type 'amxx gpl' for details.
Version 0.9.582 Linux
[DPROTO]: Parsing error: validation checking code analyzing error (2)
[DPROTO]: Parse_ConnectClient() failed
[DPROTO]: Sorry, this version of engine is not supported
L 09/20/2022 - 16:48:39: -------- Mapchange to de_dust2_2x2 --------
[AMXX] Loaded 2 admins from file
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
CAppInfoCacheReadFromDiskThread took 5 milliseconds to initialize
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Executing AMX Mod X Configuration File
Russification by Serjant
Scrolling message displaying frequency: 5:00 minutes
Server logging data to file logs/L0920047.log
L 09/20/2022 - 16:48:40: Log file started (file "logs/L0920047.log") (game "cstrike") (version "48/1.1.2.7/Stdio/8684")
L 09/20/2022 - 16:48:40: Server cvar "sv_maxspeed" = "320"
L 09/20/2022 - 16:48:40: Server cvar "mp_timelimit" = "60"
couldn't exec listip.cfg
couldn't exec banned.cfg
Menu item 17 added to Menus Front-End: "Plugin Cvars" from plugin "pluginmenu.amxx"
Menu item 18 added to Menus Front-End: "Plugin Commands" from plugin "pluginmenu.amxx"
Connection to Steam servers successful.
VAC secure mode is activated.
L 09/20/2022 - 16:48:48: World triggered "Round_Start"
GameLog (all good)
Ip I left the server is now running, maybe someone will try to do the tests ;)
Ideas?
Hello,
I'm trying to help out with a new approach for docker container integration.
I made some progress so far, but i have to overcome some limitations of docker/LinuxGSM:
I use a run.sh as entrypoint and therefore i need a proper PID 1 process for the container.
Due to the fact, that gameserver start spawns the server as new process, i can't use it.
Therefor it would be perfect, if some gameserver log command would exist, that outputs the gameserver logs into the shell like
gameserver debug does and runs as long as the gameserver does.
Then, the run.sh could look like this:
#!/bin/bash
....
su -c "gameserver start" $user
su -c "gameserver log" $user
With this aproach, docker logs -f gameserver-container would flawlessly provide all the logging from the gameserver.
Cheers
Popular mods like Exile needs a database connector like extDB2.so for server side. By default extDB2.so need some shared libraries but unfortunately one of them is not installed in the ubuntu image by default:
linuxgsm@e56d774892df:~/serverfiles/@ExileServer$ ldd extDB2.so
linux-gate.so.1 (0xf7fc9000)
libtbbmalloc.so.2 => not found
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7fb8000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf72fb000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7f95000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf710c000)
/lib/ld-linux.so.2 (0xf7fcb000)
The solution is easy: just sudo apt-get install libtbb2:i386
but sadly that step is required every time I start the service via docker-compose up
.
Is it possible to add lib32z1 and gdb to the official image, because not every time there is an opportunity to rebuild the image from the source.
`Update state (0x11) preallocating, progress: 99.76 (17963936604 / 18006952591)
Update state (0x11) preallocating, progress: 99.76 (17964478131 / 18006952591)
Update state (0x11) preallocating, progress: 99.76 (17964525029 / 18006952591)
Update state (0x11) preallocating, progress: 99.77 (17964668355 / 18006952591)
Update state (0x11) preallocating, progress: 99.77 (17965413927 / 18006952591)
Update state (0x201) stopping, progress: 0.00 (0 / 0)
Error! App '376030' state is 0x602 after update job.
Apr 21 19:30:37.502 arkserver: INSTALL: ERROR: Installing arkserver: SteamCMD: Update required but not completed - check network
Redirecting stderr to '/home/linuxgsm/.local/share/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1648077083
-- type 'quit' to exit --
Loading Steam API...OK
Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x11) preallocating, progress: 0.00 (0 / 18006952591)
Update state (0x11) preallocating, progress: 1.31 (235266364 / 18006952591)
Update state (0x11) preallocating, progress: 2.00 (360664529 / 18006952591)`
As you can see i am following the install process then at the end of it the install fails and spits out a network error. I have run this 12 times. I am also using the default configuration. So either the latest ark is broke, the steam server is cutting out or you have shipped a buggy image. Everywhere online i see others have encountered same error except they didn't wait 2 hours of installing ark to encounter it. And no there are no permission problems.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.