commit 7c50ab3fad0d518bb8f7cda72a5c9ca4bf5ec076 Author: Knut Ahlers Date: Wed Jul 11 12:43:14 2018 +0200 Initial version diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b4caa20 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.vdf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4d20386 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM luzifer/steam-base + +ARG STEAM_USER=kahlers + +COPY *.txt /home/steam/ +COPY run.sh /home/steam/ +COPY config.vdf /home/steam/Steam/config/ + +RUN set -ex \ + && apt-get update \ + && apt-get install --no-install-recommends -y libvorbisfile3 \ + && rm -rf /var/lib/apt/lists/ \ + && curl -sSfL "https://github.com/Luzifer/korvike/releases/download/v0.5.0/korvike_linux_amd64.tar.gz" | tar -xvz -C /usr/local/bin/ \ + && korvike_linux_amd64 -i /home/steam/install.txt -o /home/steam/install_processed.txt \ + && gosu steam steamcmd.sh +runscript /home/steam/install_processed.txt \ + && rm /home/steam/install_processed.txt + +VOLUME ["/home/steam/starbound/mods", "/home/steam/starbound/storage"] +EXPOSE 21025/tcp + +ENTRYPOINT ["/home/steam/run.sh"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..73e94ba --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# luzifer-docker / starbound + +Server setup for Starbound game. + +**Warning:** This Docker image contains Steam credentials and a server not being accessible to the public - You do not want to publish the image to any public registry! + +## Generate config.vdf + +In order to build the container you will need to have a `config.vdf` file which can be created using this command: + +```console +$ docker run --rm -ti -v $(pwd):/home/steam/Steam/config luzifer/steam-base gosu steam steamcmd.sh +login +quit +``` + +You will get asked for your password and - if enabled - your Steam Guard key. Afterwards a `config.vdf` file exists which you should keep secret as it contains cached credentials. diff --git a/install.txt b/install.txt new file mode 100644 index 0000000..ff86ea1 --- /dev/null +++ b/install.txt @@ -0,0 +1,5 @@ +@ShutdownOnFailedCommand 1 +login {{ env `STEAM_USER` }} +force_install_dir /home/steam/starbound +app_update 211820 +quit diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..0fdc7e3 --- /dev/null +++ b/run.sh @@ -0,0 +1,7 @@ +#!/usr/local/bin/dumb-init /bin/bash +set -euxo pipefail + +chown steam /home/steam/starbound/storage +cd /home/steam/starbound/linux + +exec gosu steam ./starbound_server