From 356610aabbdcefa03d1edb4547c91323a7ccfde5 Mon Sep 17 00:00:00 2001 From: stam Date: Thu, 24 Apr 2025 22:08:34 +0300 Subject: [PATCH] migrated games from zorg.cc --- README.md | 4 ++-- games/7d2d/Dockerfile | 39 +++++++++++++++++++++++++++++++++++ games/7d2d/Makefile | 19 +++++++++++++++++ games/7d2d/docker-compose.yml | 12 +++++++++++ games/7d2d/entrypoint.sh | 6 ++++++ games/CONTRIBUTORS.md | 17 +++++++++++++++ games/GAMES.md | 22 ++++++++++++++++++++ games/README.md | 8 +++++++ games/csgo/Dockerfile | 23 +++++++++++++++++++++ games/csgo/Makefile | 5 +++++ games/steamcmd/Dockerfile | 37 +++++++++++++++++++++++++++++++++ games/steamcmd/Makefile | 5 +++++ games/steamcmd/README.md | 10 +++++++++ 13 files changed, 205 insertions(+), 2 deletions(-) create mode 100644 games/7d2d/Dockerfile create mode 100644 games/7d2d/Makefile create mode 100644 games/7d2d/docker-compose.yml create mode 100644 games/7d2d/entrypoint.sh create mode 100644 games/CONTRIBUTORS.md create mode 100644 games/GAMES.md create mode 100644 games/README.md create mode 100644 games/csgo/Dockerfile create mode 100644 games/csgo/Makefile create mode 100644 games/steamcmd/Dockerfile create mode 100644 games/steamcmd/Makefile create mode 100644 games/steamcmd/README.md diff --git a/README.md b/README.md index 0e7f07bd1..a511918ec 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ > [!IMPORTANT] > **At 1st of May 2025 this images will be\were renamed and old images and tags will be\were deleted from Hubs (DockerHub, Quay, etc):** -* `epicmorg/linux-steamcmd` -> `epicmorg/steamcmd` - Base iamge for various games images. +* `epicmorg/linux-steamcmd` -> `epicmorg/games:steamcmd` - Base iamge for various games images. * `epicmorg/linux-csgo` -> `epicmorg/games:csgo`. -* `epicmorg/linux-7d2d` -> `epicmorg/games:steamcmd`. +* `epicmorg/linux-7d2d` -> `epicmorg/games:7d2d`. * `epicmorg/win32` -> `epicmorg/windows` - Base `windows` images like a `epicmorg/debian`. diff --git a/games/7d2d/Dockerfile b/games/7d2d/Dockerfile new file mode 100644 index 000000000..bbf8b9a68 --- /dev/null +++ b/games/7d2d/Dockerfile @@ -0,0 +1,39 @@ +############################################## +# 7d2d dedicated server +############################################## +FROM epicmorg/linux-steamcmd +LABEL maintainer="Guahos, chipmunkzombie@gmail.com" + +#Steam App ID +ARG STEAM_APP_ID=294420 + +#Environmental variables +ENV LD_LIBRARY_PATH ${VALVE_STEAMCMD_FOLDER}/linux64/ + +#Vols & dirs +WORKDIR ${VALVE_GAME_FOLDER} +VOLUME ${VALVE_VOLUME_FOLDER} +RUN mkdir ${VALVE_VOLUME_FOLDER}/worldsave && mkdir ${VALVE_VOLUME_FOLDER}/worlddata && \ + chmod 777 ${VALVE_VOLUME_FOLDER}/world* + +#Expose ports +EXPOSE 26900/tcp +EXPOSE 26900/udp +EXPOSE 26901/udp +EXPOSE 26902/udp +EXPOSE 26903/udp +EXPOSE 8080/tcp +EXPOSE 8081/tcp + +#Install 7d2d dedicated server +RUN steamcmd +login anonymous +force_install_dir ${VALVE_GAME_FOLDER} +app_update ${STEAM_APP_ID} +quit + +#Copy entrypoint script and set permissions +COPY serverconfig.xml ${VALVE_VOLUME_FOLDER}/serverconfig.xml +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + + +#Run the server +CMD ["/bin/bash", "/entrypoint.sh"] + diff --git a/games/7d2d/Makefile b/games/7d2d/Makefile new file mode 100644 index 000000000..1ee997ddf --- /dev/null +++ b/games/7d2d/Makefile @@ -0,0 +1,19 @@ +build: + docker build --tag "7d2d_ds:latest" . + +run: + docker run -itd --name "7d2d-docker" -p 26900-26903:26900-26903/udp -p 26900:26900/tcp -p 8080-8081:8080-8081 -v 7d2dvol:/valve/volume 7d2d_ds:latest + +start: + docker start 7d2d_ds + +stop: + docker stop 7d2d_ds + +showlog: + tail -f `find /var/lib/docker/volumes/7d2dvol/_data -name *log -printf "%T+\t%p\n" | sort` + +showvol: + ls -laht /var/lib/docker/volumes/7d2dvol/_data + + diff --git a/games/7d2d/docker-compose.yml b/games/7d2d/docker-compose.yml new file mode 100644 index 000000000..4797ef3c9 --- /dev/null +++ b/games/7d2d/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.7' +services: + 7d2d_server: + container_name: 7d2d_ds_v1 + build: . + ports: + - "26900-26903:26900-26903" + - "8080-8081:8080-8081" + restart: always + volumes: + - /docker/7test/vol:/valve/volume + diff --git a/games/7d2d/entrypoint.sh b/games/7d2d/entrypoint.sh new file mode 100644 index 000000000..4ab6fa895 --- /dev/null +++ b/games/7d2d/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash +$VALVE_GAME_FOLDER/7DaysToDieServer.x86_64 \ + -logfile $VALVE_VOLUME_FOLDER/7d2d_output_`date +%Y-%m-%d_%H-%M`.log \ + -quit -batchmode -nographics -dedicated \ + -configfile=$VALVE_VOLUME_FOLDER/serverconfig.xml + diff --git a/games/CONTRIBUTORS.md b/games/CONTRIBUTORS.md new file mode 100644 index 000000000..d4e115d4c --- /dev/null +++ b/games/CONTRIBUTORS.md @@ -0,0 +1,17 @@ +:muscle: Contributors +============================================ + +* **[Guahos](https://github.com/Guahos)** + + * `7 Days to Die` container + + +* **[STAM](https://github.com/stamepicmorg)** + + * Maintainer of [base images (`edge` image)](https://github.com/EpicMorg/docker-scripts). + + +:runner: Want be an contributor? +============================================ + +* Look [here](https://github.com/EpicMorg/docker-games-scripts/blob/master/.github/CONTRIBUTING.md). diff --git a/games/GAMES.md b/games/GAMES.md new file mode 100644 index 000000000..b6b9f8af7 --- /dev/null +++ b/games/GAMES.md @@ -0,0 +1,22 @@ +# :video_game: Supported Games + +### :pencil: Legend + +| ![](https://raw.githubusercontent.com/EpicMorg/docker-games-scripts/master/.github/steam.png) | Required | Not Required | ![](https://raw.githubusercontent.com/EpicMorg/docker-games-scripts/master/.github/os-win.png) ![](https://raw.githubusercontent.com/EpicMorg/docker-games-scripts/master/.github/os-nix.png) | Supported | Not Supported | +|---|---|---|---|---|---| +| Steam account |:heavy_check_mark:|:x: | Server type |:heavy_check_mark:|:x: | + +--------- + +### :book: List + +| Game| Description | ![](https://raw.githubusercontent.com/EpicMorg/docker-games-scripts/master/.github/os-win.png) | ![](https://raw.githubusercontent.com/EpicMorg/docker-games-scripts/master/.github/os-nix.png) | ![](https://raw.githubusercontent.com/EpicMorg/docker-games-scripts/master/.github/steam.png) | +|---|---|---|---|---| +| [SteamCMD](https://hub.docker.com/repository/docker/epicmorg/steamcmd/) | Just base image. | :x: | :heavy_check_mark: | :x: | + + + + + + + diff --git a/games/README.md b/games/README.md new file mode 100644 index 000000000..7c01d6a61 --- /dev/null +++ b/games/README.md @@ -0,0 +1,8 @@ +### :zap: Docker Games (scripsts) :zap: +Awesome docker containers with some games, based on our main images + +### :video_game: Supported games +* [Here](GAMES.md) + +### :speak_no_evil: Contributors +* [Here](CONTRIBUTORS.md) diff --git a/games/csgo/Dockerfile b/games/csgo/Dockerfile new file mode 100644 index 000000000..ce58c79b2 --- /dev/null +++ b/games/csgo/Dockerfile @@ -0,0 +1,23 @@ +FROM epicmorg/linux-steamcmd +LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +WORKDIR $VALVE_GAME_FOLDER + +################################################################## +# installing csgo +################################################################## + +RUN steamcmd +login anonymous +force_install_dir $VALVE_GAME_FOLDER +app_update 740 validate +quit && \ + ls -asl $VALVE_GAME_FOLDER + + +################################################################## +# cleaninig up +################################################################## +RUN apt clean -y && \ + apt autoclean -y && \ + rm -rfv $VALVE_STEAMCMD_FOLDER/steamcmd_linux.tar.gz && \ + rm -rfv /tmp/ && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb diff --git a/games/csgo/Makefile b/games/csgo/Makefile new file mode 100644 index 000000000..b26fdeac0 --- /dev/null +++ b/games/csgo/Makefile @@ -0,0 +1,5 @@ +all: emgcmd +emgcmd: + docker build --compress -t epicmorg/linux-csgo . + docker push epicmorg/linux-csgo + diff --git a/games/steamcmd/Dockerfile b/games/steamcmd/Dockerfile new file mode 100644 index 000000000..b61360fd9 --- /dev/null +++ b/games/steamcmd/Dockerfile @@ -0,0 +1,37 @@ +FROM epicmorg/edge +LABEL maintainer="EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +ENV LD_LIBRARY_PATH=/steamcmd/linux64 +ENV VALVE_FOLDER=/valve +ENV VALVE_STEAMCMD_FOLDER=${VALVE_FOLDER}/steamcmd +ENV VALVE_GAME_FOLDER=${VALVE_FOLDER}/game +ENV VALVE_VOLUME_FOLDER=${VALVE_FOLDER}/volume +ENV PATH="${VALVE_STEAMCMD_FOLDER}:${PATH}" + +WORKDIR $VALVE_STEAMCMD_FOLDER + +################################################################## +# installing steamcmd +################################################################## +RUN mkdir -p ${VALVE_STEAMCMD_FOLDER} ${VALVE_GAME_FOLDER} ${VALVE_VOLUME_FOLDER} +ADD http://media.steampowered.com/installer/steamcmd_linux.tar.gz $VALVE_STEAMCMD_FOLDER + +RUN dpkg --add-architecture i386 && \ + apt-get update && \ + apt-get autoremove -y && \ + apt-get install -y --allow-unauthenticated gcc-multilib lib32stdc++6 lib32gcc1 && \ + tar -xvf $VALVE_STEAMCMD_FOLDER/steamcmd_linux.tar.gz -C $VALVE_STEAMCMD_FOLDER && \ + ln -s $VALVE_STEAMCMD_FOLDER/steamcmd.sh $VALVE_STEAMCMD_FOLDER/steamcmd && \ + ln -s $VALVE_STEAMCMD_FOLDER/steam.sh $VALVE_STEAMCMD_FOLDER/steam && \ + steamcmd +quit + +################################################################## +# cleaninig up +################################################################## +RUN apt clean -y && \ + apt autoclean -y && \ + rm -rfv $VALVE_STEAMCMD_FOLDER/steamcmd_linux.tar.gz && \ + rm -rfv /tmp/ && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb diff --git a/games/steamcmd/Makefile b/games/steamcmd/Makefile new file mode 100644 index 000000000..fdeacb8dc --- /dev/null +++ b/games/steamcmd/Makefile @@ -0,0 +1,5 @@ +all: emgcmd +emgcmd: + docker build --compress -t epicmorg/linux-steamcmd . + docker push epicmorg/linux-steamcmd + diff --git a/games/steamcmd/README.md b/games/steamcmd/README.md new file mode 100644 index 000000000..a9be01099 --- /dev/null +++ b/games/steamcmd/README.md @@ -0,0 +1,10 @@ +# SteamCMD Base image + +Image based on [epicmorg-edge](https://github.com/EpicMorg/docker-scripts/tree/master/epicmorg) image (`debian/buster-slim`). + +## Usefull envs + +* `${VALVE_FOLDER}`=/valve +* `${VALVE_STEAMCMD_FOLDER}`=${VALVE_FOLDER}/steamcmd +* `${VALVE_GAME_FOLDER}`=${VALVE_FOLDER}/game +