diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31720b4..e15c9b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,4 +22,13 @@ jobs: with: context: . push: true - tags: andrewmhub/insurgency-sandstorm:latest \ No newline at end of file + tags: andrewmhub/insurgency-sandstorm:latest + - + name: Build and push lite + id: build-lite + uses: docker/build-push-action@v3 + with: + context: . + file: Dockerfile.lite + push: true + tags: andrewmhub/insurgency-sandstorm:lite \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index b6188d8..5049345 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -44,6 +44,16 @@ jobs: context: . push: true tags: andrewmhub/insurgency-sandstorm:latest + - + name: Build and push lite + id: build-lite + if: steps.status.outcome == 'success' + uses: docker/build-push-action@v3 + with: + context: . + file: Dockerfile.lite + push: true + tags: andrewmhub/insurgency-sandstorm:lite - name: login to git if: steps.status.outcome == 'success' run: | diff --git a/Dockerfile.lite b/Dockerfile.lite new file mode 100644 index 0000000..5ad3307 --- /dev/null +++ b/Dockerfile.lite @@ -0,0 +1,25 @@ +FROM ubuntu:jammy-20221101 +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \ + lib32gcc-s1 \ + curl \ + ca-certificates \ + locales && \ + apt-get -y upgrade && \ + locale-gen "en_US.UTF-8" && \ + export LC_ALL="en_US.UTF-8" && \ + useradd -m steam && \ + su "steam" -c \ + "mkdir -p /home/steam/steamcmd && cd /home/steam/steamcmd && \ + curl -o steamcmd_linux.tar.gz "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" && \ + tar zxf steamcmd_linux.tar.gz && \ + rm steamcmd_linux.tar.gz" && \ + apt-get remove --purge -y curl && \ + apt-get clean autoclean && \ + apt-get autoremove -y && \ + rm -rf /var/lib/{apt,dpkg} /var/{cache,log} && \ + su "steam" -c "mkdir -p /home/steam/steamcmd/sandstorm/Insurgency/Saved/SaveGames" +WORKDIR /home/steam/steamcmd +USER steam +ENTRYPOINT /home/steam/steamcmd/steamcmd.sh +force_install_dir /home/steam/steamcmd/sandstorm/ +login anonymous +app_update 581330 validate +quit && \ + /home/steam/steamcmd/sandstorm/Insurgency/Binaries/Linux/InsurgencyServer-Linux-Shipping ${LAUNCH_SERVER_ENV} -hostname="$HOSTNAME" -Port=$PORT -QueryPort=$QUERYPORT diff --git a/README.md b/README.md index 5ba963c..6183ea1 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ fixed steam warning in dockerfile "Please use force_install_dir before logon!" changed readme changed ENTRYPOINT now you can use LAUNCH_SERVER_ENV to set map new options on ini files +Nov, 2022 +added lite version, because it's become so beefy ``` @@ -37,12 +39,22 @@ cd directory where ```Dockerfile``` ## How to launch Insurgency Sandstorm dedicated server Running multiple instances (use PORT, QUERYPORT and HOSTNAME) and LAUNCH_SERVER_ENV in [modmap.env](https://github.com/AndrewMarchukov/insurgency-sandstorm-server-dockerize/blob/master/modmap.env): ``` -docker run -d --restart always --env-file /home/user/coop-modmap/modmap.env \ +docker run -d --restart unless-stopped --env-file /home/user/coop-modmap/modmap.env \ --name sandstorm-modmap --net=host \ -v /home/user/coop-modmap/Mods:/home/steam/steamcmd/sandstorm/Insurgency/Mods:rw \ -v /home/user/coop-modmap/config/ini:/home/steam/steamcmd/sandstorm/Insurgency/Saved/Config/LinuxServer:ro \ -v /home/user/coop-modmap/config/txt:/home/steam/steamcmd/sandstorm/Insurgency/Config/Server:ro andrewmhub/insurgency-sandstorm:latest ``` +#### Lite version + +All game data will be stored on disk +``` +docker run -d --restart unless-stopped --env-file /home/user/coop-modmap/modmap.env \ +--name sandstorm-modmap --net=host \ +-v /home/user/my_dir:/home/steam/steamcmd/sandstorm:rw \ + andrewmhub/insurgency-sandstorm:lite +``` + Examples config files in directory [config](https://github.com/AndrewMarchukov/insurgency-sandstorm-server-dockerize/tree/master/config) Optional launch options: @@ -51,8 +63,6 @@ Optional launch options: ```-nominidumps``` some crash dump handler that uploads crash information to insurgency devs servers this option disables it - - ### docker-compose.yml example ```dockerfile version: '3.7'