Devidian / docker-vintagestory

Creating Docker container for Vintage Story dedicated server
17 stars 4 forks source link

VS_DATA_PATH env escaped incorrectly ? #5

Open grunt009 opened 1 year ago

grunt009 commented 1 year ago

Looks like VS_DATA_PATH is incorrectly escaped somewhere during the build. Ends up creating /game/${VS_DATA_PATH} as a literal directory. Example below:

root@15c75cd673ac:/game# ls -alh
total 7.6M
drwxr-xr-x 11 root root 4.0K Aug 23 20:05 '${VS_DATA_PATH}'
drwxr-xr-x  1 root root 4.0K Aug 23 20:05  .
drwxr-xr-x  1 root root 4.0K Aug 23 20:04  ..
drwxr-xr-x  2 root root 4.0K Aug 15 06:17  Lib
drwxr-xr-x  2 root root 4.0K Aug 15 06:17  Mods
-rwx------  1 root root 1.7M Aug  9 10:02  VintagestoryAPI.dll
-rwx------  1 root root 639K Aug  9 10:02  VintagestoryAPI.pdb
-rwx------  1 root root 1.7M Aug  9 10:02  VintagestoryAPI.xml
-rwx------  1 root root 2.4M Aug  9 10:02  VintagestoryLib.dll
-rwx------  1 root root 887K Aug  9 10:02  VintagestoryLib.pdb
-rwx------  1 root root 177K Aug  9 10:02  VintagestoryServer
-rwx------  1 root root  37K Aug  9 10:02  VintagestoryServer.deps.json
-rwx------  1 root root  93K Aug  9 10:02  VintagestoryServer.dll
-rwx------  1 root root  13K Aug  9 10:02  VintagestoryServer.pdb
-rwx------  1 root root  253 Aug  9 10:02  VintagestoryServer.runtimeconfig.json
drwxr-xr-x  5 root root 4.0K Aug 15 06:17  assets
-rwx------  1 root root 8.1K Aug  9 10:02  credits.txt
-rwx------  1 root root  11K Aug  9 10:02  server.sh

Looks like the run command in the dockerfile?

CMD [ "dotnet", "VintagestoryServer.dll", "--dataPath", "${VS_DATA_PATH}" ]

Probably just needs to be

CMD [ "dotnet", "VintagestoryServer.dll", "--dataPath", "$VS_DATA_PATH" ]

If I had to guess

grunt009 commented 1 year ago

Removing the brackets didn't work. Got it working by changing from the JSON syntax to shell syntax,

CMD dotnet VintagestoryServer.dll --dataPath $VS_DATA_PATH

Results in it using the right directory.

Devidian commented 1 year ago

I can change the Dockerfile to shell in the next update. Currently i try to get 1.18.9 / 10 working but the tar command does not correctly unpack the tar file. There pop up many number directories instead. 1.18.8 did work before. Could not fix it yet.

Devidian commented 1 year ago

I've changed the downloader from alpine to debian to fix the tar.gz issue. I also changed the CMD. Try now.