-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
12 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,6 @@ | ||
# Use latest Ubuntu as base image | ||
FROM ubuntu:devel | ||
FROM rouhim/steamcmd-wine:latest | ||
|
||
# Define environment variables | ||
ENV USER_HOME "/home/ubuntu" | ||
ENV STEAMCMD "$USER_HOME/steamcmd/steamcmd.sh" | ||
ENV SERVER_DIR "/data" | ||
ENV SERVER_CONFIG_DIR "/config" | ||
ENV STEAM_APP_ID "2465200" | ||
ENV STARTUP_COMMAND "wine SonsOfTheForestDS.exe -userdatapath $SERVER_CONFIG_DIR" | ||
|
||
# Use default non root user ubuntu (1000) | ||
WORKDIR $USER_HOME | ||
|
||
# Install steamcmd and its dependencies | ||
RUN apt update && \ | ||
apt install -y wget ca-certificates lib32gcc-s1 && \ | ||
mkdir -p $USER_HOME/steamcmd && \ | ||
wget -qO- 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar zxf - -C $USER_HOME/steamcmd && \ | ||
chown -R ubuntu:ubuntu $USER_HOME/steamcmd | ||
|
||
# Install wine and its dependencies and do a full system upgrade to get the latest and greatest packages | ||
RUN apt update && \ | ||
apt install -y --no-install-recommends wine wine64 winbind xvfb && \ | ||
apt upgrade -y | ||
|
||
# Cleanup, remove wget | ||
RUN apt remove -y wget && \ | ||
apt clean && \ | ||
rm -rf /var/lib/apt/lists | ||
|
||
# Create game server and config directory | ||
RUN mkdir -p $SERVER_DIR $SERVER_CONFIG_DIR | ||
VOLUME $SERVER_DIR | ||
VOLUME $SERVER_CONFIG_DIR | ||
|
||
# Copy steam-game.script to container | ||
COPY steam-game.script $USER_HOME/steam-game.script | ||
|
||
# Change user to non-root user | ||
RUN chown -R ubuntu:ubuntu $USER_HOME && \ | ||
chown -R nobody:nogroup $SERVER_DIR $SERVER_CONFIG_DIR && \ | ||
chmod 777 -R $SERVER_DIR $SERVER_CONFIG_DIR | ||
USER ubuntu | ||
|
||
# Game port | ||
EXPOSE 8766/udp | ||
# Query port | ||
EXPOSE 27016/udp | ||
# Blobsync port | ||
EXPOSE 9700/udp | ||
|
||
# Define entrypoint | ||
COPY --chown=ubuntu:ubuntu --chmod=755 entrypoint.sh /sons-of-the-forest-server.sh | ||
ENTRYPOINT ["/sons-of-the-forest-server.sh"] | ||
COPY pre.sh $USER_HOME/pre.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
|
||
# Set skip network accessibility test to true | ||
echo "🔧 Adjust server config..." | ||
sed -i 's/"SkipNetworkAccessibilityTest": false/"SkipNetworkAccessibilityTest": true/g' "$SERVER_CONFIG_DIR"/dedicatedserver.cfg |
This file was deleted.
Oops, something went wrong.