Xonotic Forums
server_linux.sh can't find executable file. - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Server Administration (https://forums.xonotic.org/forumdisplay.php?fid=16)
+--- Thread: server_linux.sh can't find executable file. (/showthread.php?tid=9861)



server_linux.sh can't find executable file. - idk - 05-21-2024

Hello. I'm trying to create a Dockerfile to run a xonotic in a container. So far, I've written this:
Code:
FROM alpine:latest EXPOSE 26000 RUN mkdir ~/.xonotic RUN mkdir ~/xonotic COPY "./server.cfg" "~/.xonotic/data" CMD [ "/home/root/xonotic/server_linux.sh" ]
And I run it with this command:
Code:
docker run -p 26000:26000 -v C:/Users/my_user/Downloads/Xonotic:/home/root/xonotic xonotic
But I get this error:
Code:
/home/root/xonotic/server_linux.sh: exec: line 24: ./xonotic-linux64-dedicated: not found
The file is the folder. I verify it by changing the CMD instruction to CMD [ "ls", "-l", "/home/root/xonotic" ]
Then running the container (with the same command) results in:
Code:
total 97856 -rwxrwxrwx    1 root    root          2383 May 20 23:52 COPYING drwxrwxrwx    1 root    root          4096 May 20 23:52 Docs -rwxrwxrwx    1 root    root        18092 May 20 23:52 GPL-2 -rwxrwxrwx    1 root    root        35147 May 20 23:52 GPL-3 -rwxrwxrwx    1 root    root          3245 May 20 23:52 Makefile drwxrwxrwx    1 root    root          4096 May 20 23:52 Xonotic.app drwxrwxrwx    1 root    root          4096 May 20 23:52 bin32 drwxrwxrwx    1 root    root          4096 May 20 23:52 bin64 drwxrwxrwx    1 root    root          4096 May 20 23:53 data -rwxrwxrwx    1 root    root          280 May 20 23:52 key_0.d0pk drwxrwxrwx    1 root    root          4096 May 20 23:53 misc drwxrwxrwx    1 root    root          4096 May 20 23:53 server -rwxrwxrwx    1 root    root          709 May 21 18:37 server_linux.sh drwxrwxrwx    1 root    root          4096 May 20 23:53 source -rwxrwxrwx    1 root    root      5856452 May 20 23:52 xonotic-dedicated.exe -rwxrwxrwx    1 root    root            20 May 20 23:52 xonotic-linux-dedicated.sh -rwxrwxrwx    1 root    root            20 May 20 23:52 xonotic-linux-glx.sh -rwxrwxrwx    1 root    root          2727 May 20 23:52 xonotic-linux-sdl.sh -rwxrwxrwx    1 root    root      13239000 May 20 23:52 xonotic-linux64-dedicated -rwxrwxrwx    1 root    root      13785992 May 20 23:52 xonotic-linux64-glx -rwxrwxrwx    1 root    root      13759896 May 20 23:52 xonotic-linux64-sdl -rwxrwxrwx    1 root    root      3424008 May 20 23:52 xonotic-osx-dedicated -rwxrwxrwx    1 root    root      6726666 May 20 23:52 xonotic-wgl.exe -rwxrwxrwx    1 root    root      5523226 May 20 23:52 xonotic-x86-dedicated.exe -rwxrwxrwx    1 root    root      6300448 May 20 23:52 xonotic-x86-wgl.exe -rwxrwxrwx    1 root    root      13724006 May 20 23:52 xonotic-x86.exe -rwxrwxrwx    1 root    root      17769571 May 20 23:52 xonotic.exe
Any idea why could this be happening?


RE: server_linux.sh can't find executable file. - idk - 05-22-2024

I fixed it. Apparently it was a problem with alpine because it works with ubuntu:latest


RE: server_linux.sh can't find executable file. - idk - 05-22-2024

I have another problem. When I run the server it prints
Code:
You have started a dedicated server but have not created any server.cfg in your config directory.
But the server.cfg is in /home/root/.xonotic/data/, I checked with an ls


RE: server_linux.sh can't find executable file. - Freddy - 05-22-2024

The home folder for root is normally "/root/". But even in docker, it's a good idea to run software with an unprivileged user.


RE: server_linux.sh can't find executable file. - idk - 05-22-2024

That fixed it, thanks. I have this error now:
Code:
execing autoexec/empty.cfg execing autoexec.cfg Quake Error: session lock /home/xonotic/.xonotic/lock could not be acquired. Please run with -sessionid and an unique session name.
This is my dockerfile
Code:
FROM debian:bookworm EXPOSE 26000 RUN useradd xonotic USER xonotic COPY "./server.cfg" "/home/xonotic/.xonotic/data/" CMD [ "/home/xonotic/xonotic/server_linux.sh" ]
I tried adding -sessionid idk to the server_linux.sh call but didn't work
Thanks in advanced