Comments (6)
Yeah, I'm aware of it. My thinking behind it was that, in case of a faulty update that causes the container to get stuck in a restart loop, you would be able to just edit the entry.sh because it's located in a volume (and fix the cause of the issue). Rather than having to commit & recreate the container which is always a bit of a hassle imo.
from csgo.
I have never worked with Unraid, but I assume you want to expose the STEAMAPPDIR so it can be modified from outside the container?
If that is the case then show me your docker run command, maybe I can help you out by replicating the steps on my server (regular RAID1).
from csgo.
$ docker run -d --name='dragonCsGo' --net='host' -e TZ="Europe/Paris" -e HOST_OS="Unraid" -e 'SRCDS_TOKEN'='TOKEN HERE' -e 'TCP_PORT_27015'='27015' -e 'TCP_PORT_27020'='27020' -e 'SRCDS_FPSMAX'='300' -e 'SRCDS_TICKRATE'='128' -e 'SRCDS_MAXPLAYERS'='14' -e 'SRCDS_STARTMAP'='de_dust2' -e 'SRCDS_REGION'='3' -e 'SRCDS_MAPGROUP'='mg_active' -v '/mnt/user/appdata/csgo':'/home/steam/csgo-dedicated':'rw' 'cm2network/csgo:sourcemod'
Unraid works more with GUI templates for docker, so there is a lot of stuff there that's not relevant.
In console it logs the following issue: /bin/sh: 1: /home/steam/csgo-dedicated/entry.sh: not found
from csgo.
Yes, this behaviour is intended by docker, the bind-mount follows the documentation in this regard:
"If you bind-mount into a non-empty directory on the container, the directory’s existing contents are obscured by the bind mount." (Source)
This is the reason why the container can no longer find the "entry.sh" inside the container, since the directory is now empty because it was obscured by the host.
What you are looking for is probably this:
You want the bind mount/directory to be shared between host and container. This can be achieved using the following the instructions:
mkdir -p /mnt/user/appdata/csgo
chown 1000 -R /mnt/user/appdata/csgo
docker run -d --name='dragonCsGo' --net='host' -e TZ="Europe/Paris" -e HOST_OS="Unraid" -e 'SRCDS_TOKEN'='TOKEN HERE' -e 'TCP_PORT_27015'='27015' -e 'TCP_PORT_27020'='27020' -e 'SRCDS_FPSMAX'='300' -e 'SRCDS_TICKRATE'='128' -e 'SRCDS_MAXPLAYERS'='14' -e 'SRCDS_STARTMAP'='de_dust2' -e 'SRCDS_REGION'='3' -e 'SRCDS_MAPGROUP'='mg_active' -v '/mnt/user/appdata/csgo':'/home/steam/csgo-dedicated':'rshared' 'cm2network/csgo:sourcemod'
Quick explanation:
We first create the directory to be mounted by the container and change the ownership to uid 1000. This is possible because of CM2Walki/steamcmd#5, which sets the default uid for the base image to 1000. If you don't change the owner, your container won't be able to write to that directory. Lastly, we set the bind mount to rshared to propagate changes both ways.
Is this what you have been looking for?
from csgo.
Hmm, it worked with an older image but not with the current one. It appears that part of the issue is that the entrypoint (entry.sh) is located inside the volume. One solution would be to bind the csgo subdirectory (because I assume that is probably what you want to expose since it holds all the maps, configs and addons)
docker run -d --name='dragonCsGo' --net='host' -e TZ="Europe/Paris" -e HOST_OS="Unraid" -e 'SRCDS_TOKEN'='TOKEN HERE' -e 'TCP_PORT_27015'='27015' -e 'TCP_PORT_27020'='27020' -e 'SRCDS_FPSMAX'='300' -e 'SRCDS_TICKRATE'='128' -e 'SRCDS_MAXPLAYERS'='14' -e 'SRCDS_STARTMAP'='de_dust2' -e 'SRCDS_REGION'='3' -e 'SRCDS_MAPGROUP'='mg_active' --user=root -v '/opt/testvol':'/home/steam/csgo-dedicated/csgo':'rshared' 'cm2network/csgo:sourcemod'
from csgo.
As far as I could understand it, the entry.sh doesn't need to be inside STEAMCMDDIR.
Placing anywhere else should allow binding the volume with read-write.
from csgo.
Related Issues (20)
- Issue Running Docker Image HOT 2
- esl configs are outdated HOT 5
- My server is unable to list in the CSGO Community Servers HOT 2
- Server not showing on LAN tab when running on WSL2 HOT 1
- entry.sh
- Running on OS X on Docker Desktop HOT 2
- CS2 HOT 10
- Volume owner and group HOT 1
- Getting `SteamAPI_Init() failed; create pipe failed.free(): invalid pointer` on sourcemod build HOT 5
- Container is not starting on Ubuntu 18.10 HOT 13
- Malware found in container HOT 1
- How to change the server port after created a container HOT 2
- Server suddenly not starting anymore HOT 10
- Instance is not accessible from Internet HOT 2
- 100% CPU Usage can't kill container HOT 3
- missing configuration files HOT 3
- [Feature Request] Update only execution HOT 1
- Get5 mod compatibility question HOT 1
- Container don't start with Debian 11 HOT 1
- Permission denied HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csgo.