-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to support Anonymous install
- Loading branch information
Showing
4 changed files
with
41 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.git | ||
.git/* |
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,2 +1,7 @@ | ||
#!/bin/bash | ||
docker run -d -p 8080:8080 -p 8081:8081 -p 26900:26900 -p 26901:26901 -p 26902:26902 --name="7dtd" 7dtd | ||
|
||
if [ ! -d /tmp/livingdead ]; then | ||
mkdir /tmp/livingdead | ||
fi | ||
|
||
docker run -d -p 8080:8080 -p 8081:8081 -p 26900:26900 -p 26901:26901 -p 26902:26902 --name="7dtd" --volume /home/livingdead/engine:/tmp/livingdead 7dtd |
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,8 +1,26 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
PARAMS=$@ | ||
LIVINGDEAD_HOME=/opt/7dtd | ||
LIVINGDEAD_HOME=/home/livingdead | ||
|
||
cd $LIVINGDEAD_HOME/engine | ||
export LD_LIBRARY_PATH=$LIVINGDEAD_HOME/engine/ | ||
./7DaysToDieServer.x86 -configfile=serverconfig.xml -logfile $LIVINGDEAD_HOME/engine/output.log -quit -batchmode -nographics -dedicated $PARAMS | ||
cd $LIVINGDEAD_HOME | ||
|
||
echo "Downloading Steam Cmd" | ||
su -l livingdead -c "wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz -O steamcmd_linux.tar.gz" | ||
su -l livingdead -c "tar -zxf steamcmd_linux.tar.gz -C ./bin" | ||
|
||
echo "Downloading 7 Days to Die Server" | ||
su -l livingdead -c "mkdir -p ${LIVINGDEAD_HOME}/server" | ||
su -l livingdead -c "${LIVINGDEAD_HOME}/bin/steamcmd.sh \ | ||
+login anonymous \ | ||
+force_install_dir ${LIVINGDEAD_HOME}/server \ | ||
+app_update 294420 \ | ||
+quit" | ||
|
||
echo "Launching 7 Days to Die" | ||
export LD_LIBRARY_PATH=$LIVINGDEAD_HOME/server | ||
su -l livingdead -c "${LIVINGDEAD_HOME}/server/7DaysToDieServer.x86_64 \ | ||
-configfile=${LIVINGDEAD_HOME}/serverconfig.xml \ | ||
-logfile ${LIVINGDEAD_HOME}/server/output.log \ | ||
-quit -batchmode -nographics -dedicated $PARAMS" |
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,45 +1,23 @@ | ||
FROM ubuntu:latest | ||
FROM debian:latest | ||
|
||
MAINTAINER mudfly | ||
|
||
ARG STEAM_USER | ||
ARG STEAM_PASS | ||
ARG STEAM_GUARD | ||
ENV LIVINGDEAD_HOME /opt/7dtd | ||
|
||
# Install dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
lib32gcc1 \ | ||
wget \ | ||
xmlstarlet \ | ||
&& groupadd --system flesh && useradd --system --gid flesh --home /opt/7dtd --shell /bin/bash rotting \ | ||
&& apt-get clean \ | ||
RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y \ | ||
lib32gcc1 \ | ||
wget \ | ||
xmlstarlet \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR $LIVINGDEAD_HOME | ||
|
||
# Gets SteamCMD | ||
RUN wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz \ | ||
&& tar -xzf steamcmd_linux.tar.gz \ | ||
&& rm steamcmd_linux.tar.gz \ | ||
&& chown -R rotting:flesh /opt/7dtd | ||
|
||
# Install 7dtd | ||
RUN ./steamcmd.sh +login $STEAM_USER $STEAM_PASS $STEAM_GUARD +force_install_dir ./engine/ +app_update 294420 validate +quit \ | ||
&& chown -R rotting:flesh /opt/7dtd | ||
|
||
# Creates 7dtd server as a service | ||
ADD ./serverconfig.xml $LIVINGDEAD_HOME/engine/serverconfig.xml | ||
RUN chown rotting:flesh /opt/7dtd/engine/serverconfig.xml | ||
ADD ./7dtd.sh $LIVINGDEAD_HOME/bin/7dtd | ||
RUN chown -R rotting:flesh /opt/7dtd/bin | ||
RUN useradd -ms /bin/bash livingdead | ||
WORKDIR /home/livingdead | ||
COPY serverconfig.xml serverconfig.xml | ||
COPY 7dtd.sh bin/7dtd | ||
RUN chown -R livingdead:livingdead /home/livingdead | ||
|
||
# Expose the default 7dtd server port | ||
EXPOSE 8080/tcp 8081/tcp | ||
EXPOSE 26900 26901 26902 | ||
|
||
USER rotting | ||
VOLUME $LIVINGDEAD_HOME | ||
|
||
CMD ["/opt/7dtd/bin/7dtd"] | ||
CMD ["/home/livingdead/bin/7dtd"] |