Это докеризация, описывать нечего - оригинальный автор AMD, я доработал и адаптировал под Shaft.CC. Ниже идет оригинальный README.
Runs your Garry's Mod server inside Docker container as an executable
- Gmod running under non-root user (steam)
- Working luarefresh. You can update your scripts and changes will apply instantly
- Installed CSS content
- You can run commands in your container like it's not containered server
- Correct
GetConVarString("hostip")
if run with docker-compose (just edit ip inside .env) - tmysql4, luasocket and some .dll modules works fine
For detailed info look inside start.sh and docker-compose.yml
Also you can run your server with docker run
. Simple example:
docker build -t gmod-server . ; docker run --rm -it --name gmod \
-p 27015:27015/udp \
-v $PWD/volume/addons:/gmodserv/garrysmod/addons/ \
gmod-server \
-port 27015 \
-tickrate 32 \
-maxplayers 8 \
+map gm_construct \
- This image requires ~10GB of free space
- All you need (addons, data, gamemodes) located in
/gmodserv/garrysmod
- Such modules like
gmsv_socket_linux.dll
requires additional port forwarding rules. Example. If you plan to use27030/tcp
then you need to add following option todocker run
command:-p 27030:27030/tcp
- The next useful thing it's
--rm
option. If you use it the container will automatically removed after srcds process being killed. You should not remove trash containers by hands with this param --name anyname
assign pretty name to your container-d
option runs container in background. You can attach them withdocker attach container_name
(don't use with --rm).-it
there is 2 options where -t allocate a pseudo-TTY (required) and -i which allow you to interact with gmod console (run commands etc)docker logs -f container_name
let's receive logs from server!docker exec -it container_name bash
connect to container shell