Merge pull request #267 from RMartinOscar/patch-1

Change base image to already include Node & NPM
This commit is contained in:
Michael (Parker) Parker
2024-11-01 09:14:44 -04:00
committed by GitHub
3 changed files with 145 additions and 147 deletions

View File

@@ -1,4 +1,4 @@
FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim FROM --platform=$TARGETOS/$TARGETARCH node:18-slim
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
@@ -6,10 +6,8 @@ RUN dpkg --add-architecture i386 \
&& apt update \ && apt update \
&& apt upgrade -y \ && apt upgrade -y \
&& apt install -y lib32gcc-s1 lib32stdc++6 unzip curl iproute2 tzdata libgdiplus libsdl2-2.0-0:i386 \ && apt install -y lib32gcc-s1 lib32stdc++6 unzip curl iproute2 tzdata libgdiplus libsdl2-2.0-0:i386 \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \ && mkdir /wrapper \
&& apt install -y nodejs \ && npm install --prefix /wrapper ws \
&& mkdir /node_modules \
&& npm install --prefix / ws \
&& useradd -d /home/container -m container && useradd -d /home/container -m container
USER container USER container
@@ -18,6 +16,6 @@ ENV USER=container HOME=/home/container
WORKDIR /home/container WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
COPY ./wrapper.js /wrapper.js COPY ./wrapper.js /wrapper/wrapper.js
CMD [ "/bin/bash", "/entrypoint.sh" ] CMD [ "/bin/bash", "/entrypoint.sh" ]

View File

@@ -45,4 +45,4 @@ fi
export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd) export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd)
# Run the Server # Run the Server
wrapper "${MODIFIED_STARTUP}" /wrapper/wrapper.js "${MODIFIED_STARTUP}"

0
games/rust/wrapper.js Normal file → Executable file
View File