Closed fuzzy76 closed 4 years ago
Looks like a problem with the volume since steam couldn’t write to disk. Do you also have a top level volumes
key declaring the named volume? See https://docs.docker.com/compose/compose-file/#volume-configuration-reference
Also, does the example Docker compose file in this repo work for you?
I have defined the volume at top level, yes.
The example Docker compose file gives me the same error.
If I run a shell inside the container I notice that /home/steam
looks like this:
drwxr-xr-x 1 steam steam 4.0K Mar 27 19:38 .
drwxr-xr-x 1 root root 4.0K Mar 27 19:38 ..
-rw-r--r-- 1 steam steam 127 Mar 27 19:38 autoupdate_script.txt
-rw-r--r-- 1 steam steam 220 Mar 27 19:38 .bash_logout
-rw-r--r-- 1 steam steam 3.7K Mar 27 19:38 .bashrc
drwxr-xr-x 2 root root 4.0K Mar 27 19:38 csgo
-rwxr-xr-x 1 steam steam 3.6K Mar 27 19:36 manage_plugins.sh
-rw-r--r-- 1 steam steam 807 Mar 27 19:38 .profile
-rw-r--r-- 1 steam steam 767 Mar 27 19:36 README.md
-rwxr-xr-x 1 steam steam 2.5K Mar 27 19:36 start.sh
drwxr-xr-x 3 steam steam 4.0K Mar 27 19:38 .steam
drwxr-xr-x 3 steam steam 4.0K Mar 27 19:38 steamcmd
So if steamcmd is run as the steam user, it's understandable why it can't write to /home/steam/csgo
- it's owned by root and not world writable.
Starting a shell as root in the container and doing a chown -R steam /home/steam/csgo
fixed it though. But there is probably some init script that doesn't work as intended.
Thanks for debugging! I'll take a look to see what may have caused this. I suspect a recent change that no longer creates the directory beforehand in the image.
The entire /home/steam
directory has its owner:group
perms recursively set to steam:steam
as part of the build process, so wondering how it was set as root. 🤔
Okay, I tracked down the issue and fixed it in #23. I initially missed this bug because I was reusing a volume that already existed didn't have the perm issue. Time for me to add tests to the repo.
Thanks again for taking the time to report your issue and debug! 🙌
Did you add tests? I suspect #62 is of a similar nature :p
Service-definition from my docker-compose.yml:
Log output: