Container re-downloads CS2 on every restart
kghunt opened this issue · 4 comments
As mentioned above the container downloads the game every time it is restarted, regardless of if there is an update or not. This is not a massive issue but when you are trying to get the start up settings right is takes 20-30 mins each time to restart the container.
Did you mount the data to your local disk?
I tried that and for me this doesn't work. I attached to the container and found that the downloaded data is not stored under /home/steam/cs2-dedicated
but somewhere in the general Steam
folder. Interestingly, when I echo the env variable STEAMAPPDIR
, which is defined in the Dockerfile I guess, it prints the correct folder (/home/steam/cs2-dedicated
). This indicates that the entry.sh script is not running correctly. But the logs look good actually. Really strange.
The most interesting thing for me is that the container worked before on a different server 🤔 . Would be nice if you have some advice here @joedwards32. Thanks.
Edit: Ok, I found my issue at least. I forgot to chmod the main folder to 777. This shouldn't be necessary from a security perspective but maybe there are reasons for that.
Hi @kghunt,
See "Running using a bind mount for data persistence on container recreation" in the README for an example of setting up data persistence.
I had the bins mount set up but it is wrong in your example compose file and I never noticed. That sorted it. I was also getting crashes on map change sometimes so I disabled the hibernation thing. Great work BTW, it has made hosting a server really easy. Now valve just need to fix RCON.
Fixed