Hackebein / docker-srcds

Dockerfiles for all Source Dedicated Servers
https://hub.docker.com/r/hackebein/srcds/
11 stars 3 forks source link

Trying to use this for L4D2 server but it says cannot find "GAME" directory #6

Closed successtheman closed 3 months ago

successtheman commented 3 months ago

Since I am trying to use this for L4D2 if I am not mistaken i am supposed to set the "APPS" env to -e "APPS=222860 -validate -language en" and for the "GAME" env I put -e "GAME=l4d2" however when it finishes downloading everything it says the following

Success! App '222860' fully installed.
Found MetaMod latest (https://mms.alliedmods.net/mmsdrop/1.12/mmsource-1.12.0-git1194-linux.tar.gz)
tar: : Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Error occurred (return code 2):
  126                   echo "Found MetaMod ${METAMOD} (${METAMOD_URL})"
  127                   METAMOD_FILE=$(echo "${METAMOD_URL}" | rev | cut -d'/' -f1 | rev)
  128                   curl -s "${METAMOD_URL}" -o "/tmp/${METAMOD_FILE}"
  129  >>>              tar --no-same-owner -C "${GAME}" -xf "/tmp/${METAMOD_FILE}"
  130                   rm "/tmp/${METAMOD_FILE}"
  131           fi
  132       fi

I also tried the putting -e "GAME=left4dead2" but that did not work either. Am I doing something wrong?

Are we supposed to have the game installed to a directory with the name we put in "GAME" env? Also what directory do I need to mount so that it persists when I start the container? I am currently mounting a directory outside the container to /opt/overlay within the container but that doesn't seem to do any good

Hackebein commented 3 months ago

My blind guess would be -e "APPS=222860 -validate -language en" -e "GLSTAPP=222860" -e "GAME=left4dead2" GLSTAPP is only used for public access later and doesn't have anything to do with your issue.

GAME=left4dead2 (but can also be empty GAME=), srcds servers have a root folder with sub folders of the games. you can cross load resources. therefore you have to know the folder. Easy way to find it is on steamdb.info. https://steamdb.info/depot/222861/ you can see there are folders named: hl2, left4dead2, left4dead2_dlc1, left4dead2_dlc2, left4dead2_dlc3, left4dead2_lv, platform and update. my guess would be therefore left4dead2 or empty.

Are we supposed to have the game installed to a directory with the name we put in "GAME" env?

Not sure what you mean by that. you don't have to download anything yourself for this.

Also what directory do I need to mount so that it persists when I start the container? I am currently mounting a directory outside the container to /opt/overlay within the container but that doesn't seem to do any good

it does what it should i guess x) /opt/overlay gets copied over the installed server (/opt/steam) at the very end. srcds is fredgile to mount any of there folders to the outside of the container. Files are fine.

successtheman commented 3 months ago

Okay I am going to play around with it and see if I can get it working, and I will report back

My question about having to download is because it isn't saving the files after it finishes downloading to the mounted overlay folder when it gets the error I showed above

successtheman commented 3 months ago

Looks like setting GAME=left4dead2 did the trick so I am going to try and set everything up now and hope it works, thanks for the help, I will make a new issue if another problem comes up

successtheman commented 3 months ago

Oh also would there be a way to stop it from downloading the files every time the server starts? Do I just need to remove the validate line?

Hackebein commented 3 months ago

Oh also would there be a way to stop it from downloading the files every time the server starts? Do I just need to remove the validate line?

yes i think. It's steam logic. It should only download files witch are not equal to the files from steam depot with -validate flag. without it should only download missing files iirc