diff --git a/depotdl/entrypoint.sh b/depotdl/entrypoint.sh index ac58b3e..de9a7bf 100644 --- a/depotdl/entrypoint.sh +++ b/depotdl/entrypoint.sh @@ -102,4 +102,4 @@ MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}" # Run the Server -exec ${MODIFIED_STARTUP} +eval ${MODIFIED_STARTUP} diff --git a/games/valheim/Dockerfile b/games/valheim/Dockerfile index a006da6..9cf325a 100644 --- a/games/valheim/Dockerfile +++ b/games/valheim/Dockerfile @@ -46,11 +46,6 @@ RUN apt install -y \ RUN update-locale lang=en_US.UTF-8 \ && dpkg-reconfigure --frontend noninteractive locales -## Setup user and working directory -RUN useradd -m -d /home/container -s /bin/bash container -ENV USER=container HOME=/home/container -WORKDIR /home/container - ## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim requiring a valid UID ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ @@ -58,5 +53,10 @@ RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} ADD passwd.template /passwd.template +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +ENV USER=container HOME=/home/container +WORKDIR /home/container + COPY ./entrypoint.sh /entrypoint.sh CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/steamcmd/debian/Dockerfile b/steamcmd/debian/Dockerfile index a9ea3ff..803e15c 100644 --- a/steamcmd/debian/Dockerfile +++ b/steamcmd/debian/Dockerfile @@ -101,13 +101,6 @@ RUN cd /tmp/ \ && tar xvf rcon.tar.gz \ && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ -## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim requiring a valid UID -ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group -RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ - && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ - && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} -ADD passwd.template /passwd.template - # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen @@ -115,6 +108,13 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 +## Prepare NSS Wrapper for the entrypoint as a workaround for games requiring a valid UID +ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group +RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} +ADD passwd.template /passwd.template + ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container USER container diff --git a/steamcmd/entrypoint.sh b/steamcmd/entrypoint.sh index ac58b3e..de9a7bf 100644 --- a/steamcmd/entrypoint.sh +++ b/steamcmd/entrypoint.sh @@ -102,4 +102,4 @@ MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}" # Run the Server -exec ${MODIFIED_STARTUP} +eval ${MODIFIED_STARTUP} diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile index 7de6073..0249b1b 100644 --- a/steamcmd/proton/Dockerfile +++ b/steamcmd/proton/Dockerfile @@ -48,6 +48,7 @@ RUN apt update \ libfreetype6:i386 \ libgcc1 \ libgdiplus \ + libnss-wrapper \ libncurses5-dev:i386 \ libncurses5:i386 \ libncurses6 \ @@ -81,11 +82,18 @@ RUN cd /tmp/ \ && tar xvf rcon.tar.gz \ && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ +## Prepare NSS Wrapper for the entrypoint as a workaround for games requiring a valid UID +ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group +RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} +ADD passwd.template /passwd.template + ## Setup user and working directory -RUN useradd -m -d /home/container -s /bin/bash container -USER container -ENV USER=container HOME=/home/container -WORKDIR /home/container +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/steamcmd/ubuntu/Dockerfile b/steamcmd/ubuntu/Dockerfile index c8c1bca..9243989 100644 --- a/steamcmd/ubuntu/Dockerfile +++ b/steamcmd/ubuntu/Dockerfile @@ -101,13 +101,6 @@ RUN cd /tmp/ \ && tar xvf rcon.tar.gz \ && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ -## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim requiring a valid UID -ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group -RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ - && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ - && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} -ADD passwd.template /passwd.template - # Set the locale RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen @@ -115,6 +108,13 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 +## Prepare NSS Wrapper for the entrypoint as a workaround for games requiring a valid UID +ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group +RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} +ADD passwd.template /passwd.template + ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container USER container