Hackebein / docker-garrysmod

Dockerfiles for Garry's Mod
https://hub.docker.com/r/hackebein/garrysmod/
27 stars 2 forks source link

Can I mount the garrysmod files? #4

Closed vinnpinn closed 4 years ago

vinnpinn commented 4 years ago

Hey, can I mount the garrysmod files so I can place my own lua scripts and edit some options? I've only seen the option to mount the server.cfg.

Hackebein commented 4 years ago

yes, it works the same way. For example to replacing m16 weapon lua file add following parameter -v ./weapon_ttt_m16.lua:/opt/steam/garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_m16.lua

After starting the container you can spawn a shell inside the container (docker exec -it <containername/containerid> /bin/bash) if you wanna look around inside to find the right spot

Is that what you asked for?

vinnpinn commented 4 years ago

Yeah, that's it. Thank you so much

FlorianFreudiger commented 3 years ago

For example to replacing m16 weapon lua file add following parameter -v ./weapon_ttt_m16.lua:/opt/steam/garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_m16.lua

Please note changing this file won't work since steamcmd will discard any changes to it, since it validates those files. (And you can't mount them as read-only without steamcmd failing) If steamcmd wouldn't validate files you could modify the files after the initial download. Hackebein/docker-srcds#5

Hackebein commented 3 years ago

I was wrong here in multiple ways because i didn't test what my answer was. It should be -v $(pwd)/weapon_ttt_m16.lua:/opt/overlay/garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_m16.lua