I am trying to use the following Dockerfile to build and run NWN:EE from source rather than use the provided images from Beamdog. Can someone help me troubleshoot the error I am getting? I'm sure I'm just doing something simple that is wrong.
FROM ubuntu:22.04
ARG NW_SERVER_NAME
ARG NW_PLAYER_PW
ARG NW_DM_PW
ARG NW_ADMIN_PW
ENV NW_SERVER_NAME=$NW_SERVER_NAME
ENV NW_MODULE_NAME="MyAwsomeModule"
ENV NW_SERVER_VERSION=8193.34
ENV NW_MAX_CLIENTS=32
ENV NW_MIN_LEVEL=1
ENV NW_MAX_LEVEL=40
ENV NW_PAUSE_ALLOWED=0
ENV NW_PVP=1
ENV NW_SERVER_VAULT=1
ENV NW_ENFORCE_LEVEL_CHARS=1
ENV NW_ENFORCE_ILVL_RESTRICTIONS=1
ENV NW_GAME_TYPE=0
ENV NW_ONE_PARTY=0
ENV NW_DIFFICULTY_LEVEL=2
ENV NW_PLAYER_PW=$NW_PLAYER_PW
ENV NW_DM_PW=$NW_DM_PW
ENV NW_ADMIN_PW=$NW_ADMIN_PW
ENV NW_PUBLIC_SERVER=1
ENV NW_RELOAD_WHEN_EMPTY=0
ENV NW_PORT=5121
EXPOSE $NW_PORT/udp
# run all updates and install dependencies
RUN apt-get update && apt-get upgrade -y
RUN apt-get install wget git unzip zip cmake build-essential libsqlite3-dev libssl-dev libmysqlclient-dev -y
WORKDIR /root/
RUN wget https://nwn.beamdog.net/downloads/nwnee-dedicated-$NW_SERVER_VERSION.zip
RUN unzip nwnee-dedicated-$NW_SERVER_VERSION.zip
RUN rm nwnee-dedicated-$NW_SERVER_VERSION.zip
RUN ls -l
WORKDIR bin
RUN ls -l
WORKDIR linux-x86
RUN ls -l
COPY [".local/share/Neverwinter Nights","~/.local/share/Neverwinter Nights"]
WORKDIR /root/bin/linux-x86/
RUN ls -l
CMD [./nwserver-linux, -module $NW_MODULE_NAME, -maxclients $NW_MAX_CLIENTS, -minlevel $NW_MIN_LEVEL, -maxlevel $NW_MAX_LEVEL, -pauseandplay $NW_PAUSE_ALLOWED, -pvp $NW_PVP, -servervault $NW_SERVER_VAULT, -elc $NW_ENFORCE_LEVEL_CHARS, -ilr $NW_ENFORCE_ILVL_RESTRICTIONS, -gametype $NW_GAME_TYPE, -oneparty $NW_ONE_PARTY, -difficulty $NW_DIFFICULTY_LEVEL, -playerpassword $NW_PLAYER_PW, -dmpassword $NW_DM_PW, -adminpassword $NW_ADMIN_PW, -servername $NW_SERVER_NAME, -publicserver $NW_PUBLIC_SERVER, -reloadwhenempty $NW_RELOAD_WHEN_EMPTY, -port $NW_PORT]
The command I use to build and run:
docker build --build-arg NW_SERVER_NAME="MyAwesomeServer" --build-arg NW_PLAYER_PW=test123 --build-arg NW_DM_PW=test456 --build-arg NW_ADMIN_PW=test789 --no-cache -t nwserver_local_test.; docker run -t nwserver_local_test
But I always get this error that it cannot find the file that is definitely supposed to be there:
/bin/sh: 1: [./nwserver-linux,: not found