summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile33
1 files changed, 23 insertions, 10 deletions
diff --git a/Dockerfile b/Dockerfile
index eb52850..5602810 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,14 +6,17 @@ LABEL Description="Space Station 14 server"
RUN apt-get update && apt-get install -y \
wget \
curl \
- unzip
-
-RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
- && dpkg -i packages-microsoft-prod.deb \
- && rm packages-microsoft-prod.deb
-
-RUN apt-get update && apt-get install -y \
- dotnet-runtime-8.0 \
+ unzip \
+
+ # dotnet dependencies
+ libc6 \
+ libgcc-s1 \
+ libgssapi-krb5-2 \
+ libicu72 \
+ libssl3 \
+ libstdc++6 \
+ zlib1g \
+
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/ss14/server
@@ -21,11 +24,21 @@ RUN mkdir -p /opt/ss14/server
COPY server_config.toml /opt/ss14/server_config.toml
COPY update_and_start.sh /opt/ss14/update_and_start.sh
-RUN useradd -M spessman && chown -R spessman:spessman /opt/ss14
+RUN useradd -m spessman && chown -R spessman:spessman /opt/ss14
-WORKDIR /opt/ss14
+WORKDIR /home/spessman
USER spessman
+
+RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
+ && chmod +x dotnet-install.sh \
+ && ./dotnet-install.sh --runtime dotnet --channel 8.0 \
+ && rm dotnet-install.sh
+
EXPOSE 1212/tcp
EXPOSE 1212/udp
+ENV DOTNET_ROOT="/home/spessman/.dotnet"
+ENV PATH="$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools"
+
+WORKDIR /opt/ss14
CMD ["/opt/ss14/update_and_start.sh"]