Closed resuni closed 2 years ago
My guess is that this is because of a wrapper script that is added by default when installing from an Ubuntu/Debian package. For the other Linux containers I add this wrapper script at build time because they don't contain pre-build packages. See for example the Rocky container Dockerfile.
To make this is consistent I would recommend to (always) use the +force_install_dir
parameter like this:
steamcmd +login anonymous +force_install_dir /data +app_update 232250 +quit
I don't understand your explanation regarding the wrapper script, but specifying +force_install_dir
did make this a non-issue. Not only did it make the naming of the steamapps directory consistent, it also caused the app to not be installed there, so I no longer have to reference the directory at all.
While this is an acceptable solution for me, this is still a bizarre issue, so rather than close this issue myself, I'll let someone else decide if this is something that needs to be addressed further.
Good to hear the force_install_dir
option fixed your issue. The wrapper script I referred to is a script that is placed when installing steamcmd from a Ubuntu repository package, like:
apt-get install steamcmd
Installing steamcmd through the Ubuntu repository package will create this wrapper script around existing steamcmd scripts:
$ cat /usr/games/steamcmd
#!/bin/sh
# Copyright (C) 2015 Alexandre Detiste <alexandre@detiste.be>
# License: MIT
# create a fake Steam installation to avoid
# that steamcmd uses "/home/$user/Steam" instead
if [ ! -e ~/.steam ]
then
mkdir -p ~/.steam/appcache/
mkdir -p ~/.steam/config/
mkdir -p ~/.steam/logs/
mkdir -p ~/.steam/SteamApps/common/
ln -s ~/.steam ~/.steam/root
ln -s ~/.steam ~/.steam/steam
fi
if [ ! -e ~/.steam/steamcmd ]
then
mkdir -p ~/.steam/steamcmd/linux32
# steamcmd will replace these files with newer ones itself on first run
cp /usr/lib/games/steam/steamcmd.sh ~/.steam/steamcmd/
cp /usr/lib/games/steam/steamcmd ~/.steam/steamcmd/linux32/
fi
exec ~/.steam/steamcmd/steamcmd.sh $@
Other distributions like Rocky Linux or Alpine don't contain steamcmd packages so you would have to download the steamcmd
files manually, like:
$ curl http://media.steampowered.com/installer/steamcmd_linux.tar.gz \
--output steamcmd.tar.gz --silent
$ tar -xvzf steamcmd.tar.gz && rm steamcmd.tar.gz
This .tar.gz file contain the steamcmd binaries and scripts but not the wrapper script I mentioned earlier. Therefor I add them during build time in every non-Ubuntu Docker image. My guess is that this wrapper script causes a difference in install locations.
Seeing this should be the same for every different image (because of this wrapper script) I will close the issue for now. Let me know if you have any questions or like to know more about it :)
I'm experiencing a strange problem where on my Debian hosts, apps get installed to ~/.steam/SteamApps, but on my Arch hosts, apps get installed to ~/.steam/steamapps (note the case difference).
I can reproduce the problem with the following Dockerfile:
The app I'm installing in this example is TF2, but I've seen the same thing when installing Source SDK Base 2013 Dedicated Server, so I don't think this problem is dependent on the app.
Build:
docker build -t steamcmd-test .
Run:
docker run --name test steamcmd-test
Shell into the container in another terminal:
docker exec -it test bash
Inside the container:
ls -l .steam
The output on my Debian hosts:
The output on my Arch hosts:
For the sake of the test, I've made sure to re-download the steamcmd container. Both my test hosts are using the ubuntu-20 image with an Image ID of 1aa5e865e28c:
What is the intended casing of this directory? What difference between the two host operating systems or host Docker configs could possibly be causing the discrepancy?