From 4a8781c4679a19bca752c0e00dd7fd683becf521 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:20:26 +0100 Subject: [PATCH 1/5] games: add minetest --- .github/workflows/games.yml | 1 + games/minetest/Dockerfile | 19 +++++++++++++++++++ games/minetest/entrypoint.sh | 23 +++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 games/minetest/Dockerfile create mode 100644 games/minetest/entrypoint.sh diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 934455495..f6b5694fd 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -23,6 +23,7 @@ jobs: - samp - source - valheim + - minetest steps: - uses: actions/checkout@v3 diff --git a/games/minetest/Dockerfile b/games/minetest/Dockerfile new file mode 100644 index 000000000..f3da09851 --- /dev/null +++ b/games/minetest/Dockerfile @@ -0,0 +1,19 @@ +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:20.04 + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar gnupg2 sqlite3 fontconfig tzdata iproute2 libfreetype6 software-properties-common \ + && useradd -d /home/container -m container + + +RUN add-apt-repository -y ppa:minetestdevs/stable +RUN apt update && apt -y install minetest + + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/games/minetest/entrypoint.sh b/games/minetest/entrypoint.sh new file mode 100644 index 000000000..399eb5a20 --- /dev/null +++ b/games/minetest/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Default the TZ environment variable to UTC. +TZ=${TZ:-UTC} +export TZ + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Switch to the container's working directory +cd /home/container || exit 1 + +# Print minetest version +printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mminetest --version\n" +minetest --version + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} \ No newline at end of file From 0584d4f9fb4c19d61d74c6956f230849b7fa95f0 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 16 Feb 2023 16:23:30 +0100 Subject: [PATCH 2/5] add minetest to the readme --- .github/workflows/games.yml | 2 +- README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index f6b5694fd..a26020241 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -19,11 +19,11 @@ jobs: - altv - arma3 - dayz + - minetest - mohaa - samp - source - valheim - - minetest steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 75f0684c8..2444dcc0b 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,8 @@ is tagged correctly. * `ghcr.io/parkervcp/games:arma3` * [`dayz`](/games/dayz) * `ghcr.io/parkervcp/games:dayz` +* [`minetest`](/games/minetest) + * `ghcr.io/parkervcp/games:minetest` * [`mohaa`](games/mohaa) * `ghcr.io/pterodactyl/games:mohaa` * [`samp`](/games/samp) From 6534accaaaa16170cd280678bcd9f3fb4e6a88d5 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 16 Feb 2023 18:26:39 +0100 Subject: [PATCH 3/5] minetest: switch to alpine --- .github/workflows/games.yml | 2 +- games/minetest/Dockerfile | 15 ++++----------- games/minetest/entrypoint.sh | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index a26020241..7793b8f5e 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -19,7 +19,7 @@ jobs: - altv - arma3 - dayz - - minetest + - minetest - mohaa - samp - source diff --git a/games/minetest/Dockerfile b/games/minetest/Dockerfile index f3da09851..c4f55f505 100644 --- a/games/minetest/Dockerfile +++ b/games/minetest/Dockerfile @@ -1,19 +1,12 @@ -FROM --platform=$TARGETOS/$TARGETARCH ubuntu:20.04 +FROM --platform=$TARGETOS/$TARGETARCH alpine:edge -ENV DEBIAN_FRONTEND noninteractive - -RUN apt update -y \ - && apt install -y curl ca-certificates openssl git tar gnupg2 sqlite3 fontconfig tzdata iproute2 libfreetype6 software-properties-common \ - && useradd -d /home/container -m container - - -RUN add-apt-repository -y ppa:minetestdevs/stable -RUN apt update && apt -y install minetest +RUN apk add --update --no-cache ca-certificates curl ffmpeg git openssl sqlite tar tzdata minetest \ + && adduser -D -h /home/container container USER container ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file +CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/games/minetest/entrypoint.sh b/games/minetest/entrypoint.sh index 399eb5a20..31db20c1a 100644 --- a/games/minetest/entrypoint.sh +++ b/games/minetest/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ash # Default the TZ environment variable to UTC. TZ=${TZ:-UTC} From f406fc9898150633fb367435a482190c0e9f4860 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Thu, 23 Feb 2023 19:29:35 +0100 Subject: [PATCH 4/5] minetest: go back to ubuntu --- games/minetest/Dockerfile | 13 +++++++++---- games/minetest/entrypoint.sh | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/games/minetest/Dockerfile b/games/minetest/Dockerfile index c4f55f505..3e6094ffd 100644 --- a/games/minetest/Dockerfile +++ b/games/minetest/Dockerfile @@ -1,12 +1,17 @@ -FROM --platform=$TARGETOS/$TARGETARCH alpine:edge +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:20.04 +ENV DEBIAN_FRONTEND noninteractive +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar gnupg2 sqlite3 fontconfig tzdata iproute2 libfreetype6 software-properties-common \ + && useradd -d /home/container -m container -RUN apk add --update --no-cache ca-certificates curl ffmpeg git openssl sqlite tar tzdata minetest \ - && adduser -D -h /home/container container + +RUN add-apt-repository -y ppa:minetestdevs/stable +RUN apt update && apt -y install minetest USER container ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh -CMD [ "/bin/ash", "/entrypoint.sh" ] \ No newline at end of file +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/games/minetest/entrypoint.sh b/games/minetest/entrypoint.sh index 31db20c1a..399eb5a20 100644 --- a/games/minetest/entrypoint.sh +++ b/games/minetest/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/ash +#!/bin/bash # Default the TZ environment variable to UTC. TZ=${TZ:-UTC} From 8f8704ca2cc05492fcdeddb2662ab53cee55f311 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 26 Feb 2023 11:54:25 +0100 Subject: [PATCH 5/5] Games: minetest for arm64 and amd64 --- .github/workflows/games.yml | 39 ++++++++++++++++++++++++++++++++----- games/minetest/Dockerfile | 1 - 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 7793b8f5e..c2090dbd0 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -9,8 +9,8 @@ on: paths: - games/** jobs: - push: - name: "games:${{ matrix.game }}" + pushAMD64: + name: "games_AMD64:${{ matrix.game }}" runs-on: ubuntu-latest strategy: fail-fast: false @@ -18,8 +18,7 @@ jobs: game: - altv - arma3 - - dayz - - minetest + - dayz - mohaa - samp - source @@ -35,7 +34,7 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.REGISTRY_TOKEN }} - - uses: docker/build-push-action@v3 + - uses: docker/build-push-action@v4 with: context: ./games/${{ matrix.game }} file: ./games/${{ matrix.game }}/Dockerfile @@ -43,3 +42,33 @@ jobs: push: true tags: | ghcr.io/parkervcp/games:${{ matrix.game }} + pushAll: + name: "games_All:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - minetest + steps: + - uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@2 + with: + platforms: arm64,amd64 + - uses: docker/setup-buildx-action@v2 + with: + buildkitd-flags: --debug + - uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + - uses: docker/build-push-action@v4 + with: + context: ./games/${{ matrix.tag }} + file: ./games/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/parkervcp/games:${{ matrix.game }} \ No newline at end of file diff --git a/games/minetest/Dockerfile b/games/minetest/Dockerfile index 3e6094ffd..d822314ee 100644 --- a/games/minetest/Dockerfile +++ b/games/minetest/Dockerfile @@ -5,7 +5,6 @@ RUN apt update -y \ && apt install -y curl ca-certificates openssl git tar gnupg2 sqlite3 fontconfig tzdata iproute2 libfreetype6 software-properties-common \ && useradd -d /home/container -m container - RUN add-apt-repository -y ppa:minetestdevs/stable RUN apt update && apt -y install minetest