commit 4fae3d0126645fd46d5219065f743a81b402df1b1dead1dc95f640a7a9122d61 Author: Chillcog Date: Fri Jul 3 05:11:59 2026 -0700 first commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7032d79 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# editorconfig.org +root = true + +[*] +indent_style = tab +indent_size = 4 +tab_width = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.yml] +indent_style = space +indent_size = 2 +tab_width = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4b2ebbb --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text eol=lf \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..2c3a32c --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +## Description + + + +### All Submissions: + +* [ ] Have you ensured there aren't other open [Pull Requests](../pulls) for the same update or change? +* [ ] Have you created a new branch for your changes and PR from that branch and not from your master branch? + + + +### New Image Submissions: + +1. [ ] Have you added your image to the [Github workflows](https://github.com/2sharkystudios/yolks/tree/master/.github/workflows)? +2. [ ] Have you updated the README list to contain your new image? diff --git a/.github/workflows/apps.yml b/.github/workflows/apps.yml new file mode 100644 index 0000000..6521ec0 --- /dev/null +++ b/.github/workflows/apps.yml @@ -0,0 +1,50 @@ +name: build apps +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - apps/** +permissions: + packages: write + +jobs: + push: + name: "apps:${{ matrix.app }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + app: + - uptimekuma + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-qemu-action@v3 + + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + + - uses: docker/build-push-action@v6 + with: + context: ./apps/${{ matrix.app }} + file: ./apps/${{ matrix.app }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/apps:${{ matrix.app }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/apps:{0}', matrix.app) || '' }} diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml new file mode 100644 index 0000000..9c95695 --- /dev/null +++ b/.github/workflows/base.yml @@ -0,0 +1,48 @@ +name: build oses +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - oses/** +permissions: + packages: write + +jobs: + push: + name: "base:${{ matrix.oses }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + oses: + - alpine + - debian + - ubuntu + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./oses/${{ matrix.oses }} + file: ./oses/${{ matrix.oses }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/base:${{ matrix.oses }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/base:{0}', matrix.oses) || '' }} diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml new file mode 100644 index 0000000..477c7fa --- /dev/null +++ b/.github/workflows/bot.yml @@ -0,0 +1,93 @@ +name: build bot +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - bot/** +permissions: + packages: write + +jobs: + pushArm: + name: "bot:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - parkertron + - red + - sinusbot + - bastion + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64,amd64 + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./bot/${{ matrix.tag }} + file: ./bot/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/bot:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/bot:{0}', matrix.tag) || '' }} + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + # pushAmd: + # name: "yolks:bot_${{ matrix.tag }}" + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # tag: + # - bastion + # steps: + # - uses: actions/checkout@v2 + # - uses: docker/setup-buildx-action@v1 + # with: + # version: "v0.7.0" + # buildkitd-flags: --debug + # - uses: docker/login-action@v1 + # with: + # registry: ghcr.io + # username: ${{ steps.lower-repo.outputs.repository }} + # password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + # - uses: docker/build-push-action@v6 + # with: + # context: ./bot/${{ matrix.tag }} + # file: ./bot/${{ matrix.tag }}/Dockerfile + # platforms: linux/amd64 + # push: true + # tags: | + # ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/bot:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/box64.yml b/.github/workflows/box64.yml new file mode 100644 index 0000000..f9b7cb5 --- /dev/null +++ b/.github/workflows/box64.yml @@ -0,0 +1,46 @@ +name: build box64 +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - box64/** +permissions: + packages: write + +jobs: + push: + name: "box64:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - box64 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./box64 + file: ./${{ matrix.tag }}/Dockerfile + platforms: linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/box64:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/box64:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/bun.yml b/.github/workflows/bun.yml new file mode 100644 index 0000000..9e3218f --- /dev/null +++ b/.github/workflows/bun.yml @@ -0,0 +1,47 @@ +name: build bun +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - bun/** +permissions: + packages: write + +jobs: + push: + name: "bun:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - latest + - canary + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./bun + file: ./bun/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/bun:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/bun:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/cassandra.yml b/.github/workflows/cassandra.yml new file mode 100644 index 0000000..bf95cc3 --- /dev/null +++ b/.github/workflows/cassandra.yml @@ -0,0 +1,46 @@ +name: build cassandra +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - cassandra/** +permissions: + packages: write + +jobs: + push: + name: "cassandra:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - java8_python2 + - java11_python3 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./cassandra + file: ./cassandra/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/cassandra:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/cassandra:{0}', matrix.tag) || '' }} \ No newline at end of file diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml new file mode 100644 index 0000000..2c82304 --- /dev/null +++ b/.github/workflows/dart.yml @@ -0,0 +1,51 @@ +name: build dart +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - dart/** +permissions: + packages: write + +jobs: + push: + name: "dart:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - '2.17' + - '2.18' + - '2.19' + - '3.3' + - 'stable' + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./dart + file: ./dart/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/dart:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/dart:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..3bad9ab --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,53 @@ +name: build dotnet +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - dotnet/** +permissions: + packages: write + +jobs: + push: + name: "dotnet:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 2.1 + - 3.1 + - 5 + - 6 + - 7 + - 8 + - 9 + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./dotnet + file: ./dotnet/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/dotnet:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/dotnet:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..5bed458 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,50 @@ +name: build elixir +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - elixir/** +permissions: + packages: write + +jobs: + push: + name: "elixir:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - '1.15' + - '1.14' + - '1.13' + - '1.12' + - latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./elixir + file: ./elixir/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/elixir:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/elixir:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml new file mode 100644 index 0000000..0c582f9 --- /dev/null +++ b/.github/workflows/erlang.yml @@ -0,0 +1,49 @@ +name: build erlang +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - erlang/** +permissions: + packages: write + +jobs: + push: + name: "erlang:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 22 + - 23 + - 24 + - 25 + - 26 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./erlang + file: ./erlang/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/erlang:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/erlang:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml new file mode 100644 index 0000000..84daedb --- /dev/null +++ b/.github/workflows/games.yml @@ -0,0 +1,90 @@ +name: build games +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - games/** +permissions: + packages: write + +jobs: + pushAMD64: + name: "games_AMD64:${{ matrix.game }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + game: + - altv + - arma3 + - dayz + - mohaa + - rust + - samp + - source + - valheim + - thebattleforwesnoth + + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./games/${{ matrix.game }} + file: ./games/${{ matrix.game }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/games:${{ matrix.game }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/games:{0}', matrix.game) || '' }} + pushAll: + name: "games_All:${{ matrix.game }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + game: + - minetest + - mta + steps: + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64,amd64 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./games/${{ matrix.game }} + file: ./games/${{ matrix.game }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/games:${{ matrix.game }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/games:{0}', matrix.game) || '' }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..ed509c7 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,54 @@ +name: build go +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - go/** +permissions: + packages: write + +jobs: + push: + name: "go:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - '1.14' + - '1.15' + - '1.16' + - '1.17' + - '1.18' + - '1.19' + - '1.20' + - '1.21' + - '1.22' + - '1.23' + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./go + file: ./go/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/go:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/go:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml new file mode 100644 index 0000000..a3a85c2 --- /dev/null +++ b/.github/workflows/installers.yml @@ -0,0 +1,58 @@ +name: build installers +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - installers/** +permissions: + packages: write + +jobs: + push: + name: "installers:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - alpine + - debian + - ubuntu + - ubuntu-amd64 + include: + - tag: ubuntu-amd64 + platforms: linux/amd64 + - tag: ubuntu + platforms: linux/amd64,linux/arm64 + - tag: alpine + platforms: linux/amd64,linux/arm64 + - tag: debian + platforms: linux/amd64,linux/arm64 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./installers + file: ./installers/${{ matrix.tag }}/Dockerfile + platforms: ${{ matrix.platforms }} + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/installers:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/installers:{0}', matrix.tag) || '' }} \ No newline at end of file diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml new file mode 100644 index 0000000..a8138f1 --- /dev/null +++ b/.github/workflows/java.yml @@ -0,0 +1,53 @@ +name: build java +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - java/** +permissions: + packages: write + +jobs: + push: + name: "java:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 8 + - 11 + - 16 + - 17 + - 19 + - 21 + - 22 + - 25 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./java + file: ./java/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/java:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/java:{0}', matrix.tag) || '' }} \ No newline at end of file diff --git a/.github/workflows/mariadb.yml b/.github/workflows/mariadb.yml new file mode 100644 index 0000000..4903de3 --- /dev/null +++ b/.github/workflows/mariadb.yml @@ -0,0 +1,56 @@ +name: build mariadb +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - mariadb/** +permissions: + packages: write + +jobs: + push: + name: "mariadb:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - '10.3' + - '10.4' + - '10.5' + - '10.6' + - '10.7' + - '11.2' + - '11.3' + - '11.4' + - '11.5' + - '11.6' + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./mariadb + file: ./mariadb/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/mariadb:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/mariadb:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/mongodb.yml b/.github/workflows/mongodb.yml new file mode 100644 index 0000000..7eb0758 --- /dev/null +++ b/.github/workflows/mongodb.yml @@ -0,0 +1,50 @@ +name: build mongodb +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - mongodb/** +permissions: + packages: write + +jobs: + push: + name: "mongodb:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + + - 6 + - 7 + - 8 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./mongodb + file: ./mongodb/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/mongodb:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/mongodb:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/mono.yml b/.github/workflows/mono.yml new file mode 100644 index 0000000..1721d7a --- /dev/null +++ b/.github/workflows/mono.yml @@ -0,0 +1,45 @@ +name: build mono +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - mono/** +permissions: + packages: write + +jobs: + push: + name: "mono:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./mono + file: ./mono/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/mono:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/mono:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..6a0e9de --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,57 @@ +name: build nodejs +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - nodejs/** +permissions: + packages: write + +jobs: + push: + name: "nodejs:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 12 + - 14 + - 16 + - 17 + - 18 + - 19 + - 20 + - 21 + - 22 + - 23 + - 24 + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./nodejs + file: ./nodejs/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/nodejs:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/nodejs:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml new file mode 100644 index 0000000..5cffeee --- /dev/null +++ b/.github/workflows/postgres.yml @@ -0,0 +1,53 @@ +name: build postgres +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - postgres/** +permissions: + packages: write + +jobs: + push: + name: "postgres:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 9 + - 10 + - 11 + - 12 + - 13 + - 14 + - 16 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./postgres + file: ./postgres/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/postgres:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/postgres:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..4e2abc7 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,54 @@ +name: build python +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - python/** +permissions: + packages: write + +jobs: + push: + name: "python:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - '2.7' + - '3.7' + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - '3.13' + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./python + file: ./python/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/python:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/python:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/redis.yml b/.github/workflows/redis.yml new file mode 100644 index 0000000..958a0fb --- /dev/null +++ b/.github/workflows/redis.yml @@ -0,0 +1,50 @@ +name: build redis +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - redis/** +permissions: + packages: write + +jobs: + push: + name: "redis:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 5 + - 6 + - 7 + - 8 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./redis + file: ./redis/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/redis:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/redis:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..c39f1ec --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,49 @@ +name: build rust +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - rust/** +permissions: + packages: write + +jobs: + push: + name: "rust:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - '1.56' + - '1.60' + - 'latest' + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./rust + file: ./rust/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/rust:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/rust:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/shareforge.yaml b/.github/workflows/shareforge.yaml new file mode 100644 index 0000000..4b22df5 --- /dev/null +++ b/.github/workflows/shareforge.yaml @@ -0,0 +1,47 @@ +name: build shareforge +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - shareforge/** +permissions: + packages: write + +jobs: + push: + name: "kylehost:shareforge_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - '1.41.4' + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./shareforge + file: ./shareforge/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/shareforge:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/shareforge:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/steamcmd.yml b/.github/workflows/steamcmd.yml new file mode 100644 index 0000000..011b513 --- /dev/null +++ b/.github/workflows/steamcmd.yml @@ -0,0 +1,59 @@ +name: build steamcmd +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - steamcmd/** +permissions: + packages: write + +jobs: + push: + name: "steamcmd:${{ matrix.distro }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + distro: + - debian + - ubuntu + - dotnet + - proton + - proton_8 + - sniper + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./steamcmd + file: ./steamcmd/${{ matrix.distro }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/steamcmd:${{ matrix.distro }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/steamcmd:{0}', matrix.distro) || '' }} + # Enable caching for faster builds (reuses layers across runs) + cache-from: type=gha + cache-to: type=gha,mode=max + # Add build args if needed for multi-platform or custom vars (e.g., for TARGETOS/TARGETARCH) + build-args: | + TARGETOS=linux + TARGETARCH=amd64 + # Optional: Disable push on failure for debugging (set to false to always push if build succeeds) + # outputs: type=image,name=image-${{ matrix.distro }},id=image-${{ matrix.distro }}-id diff --git a/.github/workflows/tarkov.yml b/.github/workflows/tarkov.yml new file mode 100644 index 0000000..d1aff81 --- /dev/null +++ b/.github/workflows/tarkov.yml @@ -0,0 +1,47 @@ +name: build tarkov +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - tarkov/** +permissions: + packages: write + +jobs: + push: + name: "tarkov:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - v4.0.11 + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./tarkov + file: ./tarkov/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/tarkov:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/tarkov:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/voice.yml b/.github/workflows/voice.yml new file mode 100644 index 0000000..cf78481 --- /dev/null +++ b/.github/workflows/voice.yml @@ -0,0 +1,81 @@ +name: build voice +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - voice/** +permissions: + packages: write + +jobs: + pushx64: + name: "voice:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - teaspeak + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./voice/${{ matrix.tag }} + file: ./voice/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/voice:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/voice:{0}', matrix.tag) || '' }} + + + pushx64_arm64: + name: "yolks:voice_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - mumble + steps: + - uses: actions/checkout@v4 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + with: + version: "v0.8.2" + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./voice/${{ matrix.tag }} + file: ./voice/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/voice:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/voice:{0}', matrix.tag) || '' }} diff --git a/.github/workflows/wine.yml b/.github/workflows/wine.yml new file mode 100644 index 0000000..9c13782 --- /dev/null +++ b/.github/workflows/wine.yml @@ -0,0 +1,51 @@ +name: build wine +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - wine/** +permissions: + packages: write + +jobs: + push: + name: "wine:${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - "7" + - "8" + - "9" + - "10" + - latest + - devel + - staging + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - id: lower-repo + name: Repository to lowercase + run: | + echo "repository=${GITHUB_REPOSITORY_OWNER@L}" >> $GITHUB_OUTPUT + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ steps.lower-repo.outputs.repository }} + password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + context: ./wine + file: ./wine/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ steps.lower-repo.outputs.repository }}/wine:${{ matrix.tag }} + ${{ github.repository_owner == '2sharkystudios' && format('ghcr.io/2sharkystudios/wine:{0}', matrix.tag) || '' }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40fceef --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +.idea + +paid/ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..d98b0af --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Matthew Penner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f4f5ab --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ + + +# Yolks +[![Last Commit](https://img.shields.io/github/last-commit/2SharkyStudios/yolks?label=last%20commit)](https://github.com/2SharkyStudios/yolks/commits) [![Stars](https://img.shields.io/github/stars/2SharkyStudios/yolks)](https://github.com/2SharkyStudios/yolks/stargazers) + + + +A curated collection of core images that can be used with Pterodactyl's Egg system. Each image is rebuilt periodically to ensure dependencies are always up-to-date. Its each monday at 12:00 PM UTC + +All of these images are available for `linux/amd64` and `linux/arm64` versions, unless otherwise specified, to use +these images on an arm system, no modification to them or the tag is needed, they should just work. + +## Images +### Installers +[![build installers](https://github.com/2SharkyStudios/yolks/actions/workflows/installers.yml/badge.svg)](https://github.com/2SharkyStudios/yolks/actions/workflows/installers.yml) +
+` ghcr.io/2sharkystudios/installers: `
+ubuntu
+alpine
+debian
+ubuntu-amd64
+ +## Apps diff --git a/apps/uptimekuma/Dockerfile b/apps/uptimekuma/Dockerfile new file mode 100644 index 0000000..873a66b --- /dev/null +++ b/apps/uptimekuma/Dockerfile @@ -0,0 +1,62 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks/" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk update \ + && apk upgrade + +RUN apk add --no-cache \ + autoconf \ + automake \ + build-base \ + ca-certificates\ + chromium \ + curl \ + bind-tools \ + ffmpeg \ + g++ \ + git \ + gpg \ + gnupg \ + iproute2 \ + iputils-ping \ + libtool \ + musl \ + musl-utils \ + musl-locales \ + python3 \ + python3-dev \ + py3-pip \ + pipx \ + sqlite \ + tzdata \ + zip \ + libc6-compat \ + tini + +# updating npm +RUN npm install npm@latest -g + +# download cloudflared +ARG TARGETPLATFORM +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; fi \ + && curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCHITECTURE} -o /usr/bin/cloudflared +RUN chmod +x /usr/bin/cloudflared + +# install apprise +RUN pipx install apprise + +## Setup user and working directory +RUN adduser -D -h /home/container container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/apps/uptimekuma/entrypoint.sh b/apps/uptimekuma/entrypoint.sh new file mode 100644 index 0000000..9e771f0 --- /dev/null +++ b/apps/uptimekuma/entrypoint.sh @@ -0,0 +1,41 @@ +#!/bin/ash +#System variables +clear +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +# Switch to the container's working directory +cd /home/container || exit 1 + +# Wait for the container to fully initialize +sleep 1 + +# 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 + +# system informations +echo -e "${BLUE}-------------------------------------------------${NC}" +echo -e "${RED}Uptime Kuma Image${NC}" +echo -e "${BLUE}-------------------------------------------------${NC}" +echo -e "${YELLOW}Running on Alpine: ${RED} $(cat /etc/alpine-release)${NC}" +echo -e "${YELLOW}Current timezone: ${RED} ${TZ} ${NC}" +echo -e "${YELLOW}NodeJS Version: ${RED} $(node -v) ${NC}" +echo -e "${YELLOW}Cloudflared Version: ${RED} $(/usr/bin/cloudflared --version) ${NC}" +echo -e "${BLUE}-------------------------------------------------${NC}" + +export PATH=$PATH:/root/.local/bin + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/bot/bastion/Dockerfile b/bot/bastion/Dockerfile new file mode 100644 index 0000000..6742680 --- /dev/null +++ b/bot/bastion/Dockerfile @@ -0,0 +1,26 @@ +FROM --platform=$TARGETOS/$TARGETARCH mongo:7-jammy + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +## install nodejs 20 +RUN apt update && apt install --no-install-recommends -y curl apt-transport-https ca-certificates gnupg \ + && mkdir -p /usr/share/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && apt update && apt install -y nodejs \ + && npm install -g npm@latest \ + ## install bastion reqs + && apt install -y python3 build-essential git libtool netcat ffmpeg iproute2 tzdata tini \ + ## add container user + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/bot/bastion/entrypoint.sh b/bot/bastion/entrypoint.sh new file mode 100644 index 0000000..699e46c --- /dev/null +++ b/bot/bastion/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash +#Variables +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' + +clear +#show versions +echo -e "${BLUE}-------------------------------------------------${NC}" +echo -e "${YELLOW}BastionBot Installation${NC}" +echo -e "${BLUE}-------------------------------------------------${NC}" +echo -e "${YELLOW}MongoDB Version:${NC} " && mongod --version +echo -e "${YELLOW}NodeJS Version:${NC} " && node -v +echo -e "${YELLOW}Python Version:${NC} " && python3 --version +echo -e "${BLUE}-------------------------------------------------${NC}" + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')) +echo -e "${YELLOW}:/home/container${NC} ${MODIFIED_STARTUP}" + +# start mongo +echo -e "${BLUE}-------------------------------------------------${NC}" +echo -e "${YELLOW}starting MongoDB...${NC}" +echo -e "${BLUE}-------------------------------------------------${NC}" +mongod --fork --dbpath /home/container/mongodb/ --port 27017 --logpath /home/container/mongod.log --logRotate reopen --logappend && until nc -z -v -w5 127.0.0.1 27017; do echo 'Waiting for mongodb connection...'; sleep 5; done + +# Run the Server +echo -e "${BLUE}-------------------------------------------------${NC}" +echo -e "${YELLOW}BastionBot starting...${NC}" +echo -e "${BLUE}-------------------------------------------------${NC}" +eval ${MODIFIED_STARTUP} + +# stop mongo +mongod --eval "db.adminCommand({ "shutdown" : 1 })" diff --git a/bot/parkertron/Dockerfile b/bot/parkertron/Dockerfile new file mode 100644 index 0000000..49f6c5c --- /dev/null +++ b/bot/parkertron/Dockerfile @@ -0,0 +1,20 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + # general packages + && apt install -y iproute2 ca-certificates \ + # additional packages for tesseract and eng lang support + libtesseract-dev tesseract-ocr-eng \ + # add container user to run application + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/bot/parkertron/entrypoint.sh b/bot/parkertron/entrypoint.sh new file mode 100644 index 0000000..62d55b0 --- /dev/null +++ b/bot/parkertron/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/bot/red/Dockerfile b/bot/red/Dockerfile new file mode 100644 index 0000000..08dd1d7 --- /dev/null +++ b/bot/red/Dockerfile @@ -0,0 +1,56 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim-bookworm + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + + +RUN mkdir -p /usr/share/man/man1 +RUN apt update \ + && apt -y upgrade \ + && apt -y install \ + git \ + ca-certificates \ + dnsutils \ + iproute2 \ + wget \ + curl \ + xz-utils \ + openjdk-17-jre-headless \ + zlib1g-dev \ + libffi-dev \ + libmagickwand-dev \ + unzip \ + libaa1-dev \ + build-essential \ + tk-dev \ + libncurses5-dev \ + libncursesw5-dev \ + libreadline6-dev \ + libdb5.3-dev \ + libgdbm-dev \ + libsqlite3-dev \ + libssl-dev \ + libbz2-dev \ + libexpat1-dev \ + liblzma-dev \ + ffmpeg \ + imagemagick \ + tini + +RUN pip install --upgrade pip +RUN pip install python-forecastio tweepy unidecode mcstatus bs4 sqlalchemy geocoder valve python-valve py-cpuinfo psutil + +RUN mkdir -p /home/container/.config/Red-DiscordBot/ +RUN ln -s /home/container/.config/Red-DiscordBot/ /usr/local/share/Red-DiscordBot + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/bot/red/entrypoint.sh b/bot/red/entrypoint.sh new file mode 100644 index 0000000..72f729c --- /dev/null +++ b/bot/red/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')) +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/bot/sinusbot/Dockerfile b/bot/sinusbot/Dockerfile new file mode 100644 index 0000000..f2d9c9d --- /dev/null +++ b/bot/sinusbot/Dockerfile @@ -0,0 +1,29 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL org.opencontainers.image.authors="postmaster@terraforge.fun" +LABEL version="1.0" + +ENV DEBIAN_FRONTEND=noninteractive + +# Install Dependencies +RUN apt update \ + && apt upgrade -y \ + && apt install -y ca-certificates less locales pulseaudio python3 python3-pip sudo x11vnc x11-xkb-utils xvfb iproute2 ffmpeg curl liblcms2-2 libatomic1 libxcb-xinerama0 \ + fontconfig libasound2 libegl1-mesa libglib2.0-0 libnss3 libpci3 libpulse0 libxcursor1 libxslt1.1 libx11-xcb1 libxkbcommon0 bzip2 libxss1 libxcomposite1 libevent-2.1-7 \ + libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0 tini \ + && useradd -m -d /home/container container +#RUN python3 -m pip install requests + +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/bot/sinusbot/entrypoint.sh b/bot/sinusbot/entrypoint.sh new file mode 100644 index 0000000..b06ff45 --- /dev/null +++ b/bot/sinusbot/entrypoint.sh @@ -0,0 +1,14 @@ +#!/bin/bash +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/box64/Dockerfile b/box64/Dockerfile new file mode 100644 index 0000000..e4d5dc9 --- /dev/null +++ b/box64/Dockerfile @@ -0,0 +1,34 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +## Update base packages +RUN apt update \ + && apt upgrade -y + +## Install dependencies +RUN apt install -y libc++-dev libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig libicu72 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libmariadb-dev-compat libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ + libz3-dev rapidjson-dev tzdata libevent-dev libzip4 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 build-essential cmake libgdiplus libstdc++6 + +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + + +##Install box64 +RUN wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list \ + && wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg \ + && apt update && apt install box64-rpi4arm64 -y + + + +RUN useradd -d /home/container -m container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/box64/entrypoint.sh b/box64/entrypoint.sh new file mode 100644 index 0000000..f5ca446 --- /dev/null +++ b/box64/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` + + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} \ No newline at end of file diff --git a/bun/canary/Dockerfile b/bun/canary/Dockerfile new file mode 100644 index 0000000..0fbcee0 --- /dev/null +++ b/bun/canary/Dockerfile @@ -0,0 +1,20 @@ +FROM --platform=$TARGETOS/$TARGETARCH oven/bun:canary + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool tini \ + && useradd -m -d /home/container container + +RUN bun upgrade + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/bun/entrypoint.sh b/bun/entrypoint.sh new file mode 100644 index 0000000..c0c198c --- /dev/null +++ b/bun/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Print Bun Version +bun -v + +# 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} diff --git a/bun/latest/Dockerfile b/bun/latest/Dockerfile new file mode 100644 index 0000000..8a6bf2d --- /dev/null +++ b/bun/latest/Dockerfile @@ -0,0 +1,20 @@ +FROM --platform=$TARGETOS/$TARGETARCH oven/bun:latest + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool tini \ + && useradd -m -d /home/container container + +RUN bun upgrade + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/cassandra/entrypoint.sh b/cassandra/entrypoint.sh new file mode 100644 index 0000000..e70f135 --- /dev/null +++ b/cassandra/entrypoint.sh @@ -0,0 +1,38 @@ +#!/bin/ash + +# 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 Java version +printf "\033[1m\033[33mcontainer~ \033[0mjava -version\n" +java -version + + +# Print Python version +if command -v python &> /dev/null +then + printf "\033[1m\033[33mcontainer~ \033[0mpython --version\n" + python --version +else + printf "\033[1m\033[33mcontainer~ \033[0mpython3 --version\n" + python3 --version +fi + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" diff --git a/cassandra/java11_python3/Dockerfile b/cassandra/java11_python3/Dockerfile new file mode 100644 index 0000000..88b1ae8 --- /dev/null +++ b/cassandra/java11_python3/Dockerfile @@ -0,0 +1,16 @@ +FROM --platform=$TARGETOS/$TARGETARCH adoptopenjdk/openjdk11:alpine-jre + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache python3 py3-tz ca-certificates curl fontconfig git openssl sqlite tar tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/cassandra/java8_python2/Dockerfile b/cassandra/java8_python2/Dockerfile new file mode 100644 index 0000000..dc12de2 --- /dev/null +++ b/cassandra/java8_python2/Dockerfile @@ -0,0 +1,17 @@ +FROM --platform=$TARGETOS/$TARGETARCH adoptopenjdk/openjdk8:alpine-jre + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache python2 ca-certificates curl fontconfig git openssl sqlite tar tzdata \ + && python -m ensurepip --upgrade && pip install pytz \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/dart/2.17/Dockerfile b/dart/2.17/Dockerfile new file mode 100644 index 0000000..fa857c1 --- /dev/null +++ b/dart/2.17/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH dart:2.17 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install iproute2 git ca-certificates tzdata tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dart/2.18/Dockerfile b/dart/2.18/Dockerfile new file mode 100644 index 0000000..9f6b92a --- /dev/null +++ b/dart/2.18/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH dart:2.18 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install iproute2 git ca-certificates tzdata tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dart/2.19/Dockerfile b/dart/2.19/Dockerfile new file mode 100644 index 0000000..c4a02c6 --- /dev/null +++ b/dart/2.19/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH dart:2.19 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install iproute2 git ca-certificates tzdata tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dart/3.3/Dockerfile b/dart/3.3/Dockerfile new file mode 100644 index 0000000..c0fc247 --- /dev/null +++ b/dart/3.3/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH dart:3.3 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install iproute2 git ca-certificates tzdata tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dart/entrypoint.sh b/dart/entrypoint.sh new file mode 100644 index 0000000..00feb53 --- /dev/null +++ b/dart/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Print Dart version +dart --version + +# Replace startup variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the server +eval ${MODIFIED_STARTUP} diff --git a/dart/stable/Dockerfile b/dart/stable/Dockerfile new file mode 100644 index 0000000..a8dedd0 --- /dev/null +++ b/dart/stable/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH dart:stable + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install iproute2 git ca-certificates tzdata tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/2.1/Dockerfile b/dotnet/2.1/Dockerfile new file mode 100644 index 0000000..bf2805c --- /dev/null +++ b/dotnet/2.1/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/parkervcp/yolks:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/2.1 | grep -i '

SDK 2.1.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/3.1/Dockerfile b/dotnet/3.1/Dockerfile new file mode 100644 index 0000000..2fec817 --- /dev/null +++ b/dotnet/3.1/Dockerfile @@ -0,0 +1,26 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/3.1 | grep -i '

SDK 3.1.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/5/Dockerfile b/dotnet/5/Dockerfile new file mode 100644 index 0000000..75d68b7 --- /dev/null +++ b/dotnet/5/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/parkervcp/yolks:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/5.0 | grep -i '

SDK 5.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/6/Dockerfile b/dotnet/6/Dockerfile new file mode 100644 index 0000000..f98f62f --- /dev/null +++ b/dotnet/6/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/parkervcp/yolks:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/6.0 | grep -i '

SDK 6.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/7/Dockerfile b/dotnet/7/Dockerfile new file mode 100644 index 0000000..abfa7d1 --- /dev/null +++ b/dotnet/7/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/7.0 | grep -i '

SDK 7.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/8/Dockerfile b/dotnet/8/Dockerfile new file mode 100644 index 0000000..d326447 --- /dev/null +++ b/dotnet/8/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/8.0 | grep -i '

SDK 8.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/9/Dockerfile b/dotnet/9/Dockerfile new file mode 100644 index 0000000..ea550a7 --- /dev/null +++ b/dotnet/9/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget curl git git-lfs iproute2 libgdiplus tini \ + && wget https://dot.net/v1/dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '

SDK 9.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && chmod +x dotnet-install.sh \ + && ./dotnet-install.sh -i /usr/share -v $D_V \ + && ln -s /usr/share/dotnet /usr/bin/dotnet + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/dotnet/entrypoint.sh b/dotnet/entrypoint.sh new file mode 100644 index 0000000..e45691e --- /dev/null +++ b/dotnet/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/bash +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# set this variable, dotnet needs it even without it it reports to `dotnet --info` it can not start any aplication without this +export DOTNET_ROOT=/usr/share/ + +# print the dotnet version on startup +printf "\033[1m\033[33mcontainer~ \033[0mdotnet --version\n" +dotnet --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} diff --git a/elixir/1.12/Dockerfile b/elixir/1.12/Dockerfile new file mode 100644 index 0000000..baaca44 --- /dev/null +++ b/elixir/1.12/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH elixir:1.12.3-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/1.13/Dockerfile b/elixir/1.13/Dockerfile new file mode 100644 index 0000000..5c1dc73 --- /dev/null +++ b/elixir/1.13/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH elixir:1.13.4-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/1.14/Dockerfile b/elixir/1.14/Dockerfile new file mode 100644 index 0000000..670a539 --- /dev/null +++ b/elixir/1.14/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH elixir:1.14.5-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/1.15/Dockerfile b/elixir/1.15/Dockerfile new file mode 100644 index 0000000..b00c55a --- /dev/null +++ b/elixir/1.15/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH elixir:1.15.4-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/entrypoint.sh b/elixir/entrypoint.sh new file mode 100644 index 0000000..8e5667a --- /dev/null +++ b/elixir/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Print Elixir Version +elixir -e 'IO.puts "Elixir " <> System.version()' + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/elixir/latest/Dockerfile b/elixir/latest/Dockerfile new file mode 100644 index 0000000..936cfe5 --- /dev/null +++ b/elixir/latest/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH elixir:slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/empty b/empty new file mode 100644 index 0000000..acd443d --- /dev/null +++ b/empty @@ -0,0 +1 @@ +empty diff --git a/erlang/22/Dockerfile b/erlang/22/Dockerfile new file mode 100644 index 0000000..bc6e5a0 --- /dev/null +++ b/erlang/22/Dockerfile @@ -0,0 +1,16 @@ +FROM --platform=$TARGETOS/$TARGETARCH erlang:22-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates curl git openssl sqlite tar tzdata iproute2 \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/erlang/23/Dockerfile b/erlang/23/Dockerfile new file mode 100644 index 0000000..f1f2f2b --- /dev/null +++ b/erlang/23/Dockerfile @@ -0,0 +1,16 @@ +FROM --platform=$TARGETOS/$TARGETARCH erlang:23-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates curl git openssl sqlite tar tzdata iproute2\ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/erlang/24/Dockerfile b/erlang/24/Dockerfile new file mode 100644 index 0000000..5c8b7b6 --- /dev/null +++ b/erlang/24/Dockerfile @@ -0,0 +1,16 @@ +FROM --platform=$TARGETOS/$TARGETARCH erlang:24-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates curl git openssl sqlite tar tzdata iproute2 \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/erlang/25/Dockerfile b/erlang/25/Dockerfile new file mode 100644 index 0000000..ff0cdc2 --- /dev/null +++ b/erlang/25/Dockerfile @@ -0,0 +1,16 @@ +FROM --platform=$TARGETOS/$TARGETARCH erlang:25-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates curl git openssl sqlite tar tzdata iproute2 \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/erlang/26/Dockerfile b/erlang/26/Dockerfile new file mode 100644 index 0000000..5e92fa6 --- /dev/null +++ b/erlang/26/Dockerfile @@ -0,0 +1,16 @@ +FROM --platform=$TARGETOS/$TARGETARCH erlang:26-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates curl git openssl sqlite tar tzdata iproute2 \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/erlang/entrypoint.sh b/erlang/entrypoint.sh new file mode 100644 index 0000000..5e20937 --- /dev/null +++ b/erlang/entrypoint.sh @@ -0,0 +1,25 @@ +# 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 Erlang's version +printf "\033[1m\033[33mcontainer~ \033[0merl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()'\n" +erl -noshell -eval 'erlang:display(erlang:system_info(system_version))' -eval 'init:stop()' + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" diff --git a/games/altv/Dockerfile b/games/altv/Dockerfile new file mode 100644 index 0000000..a68f7a6 --- /dev/null +++ b/games/altv/Dockerfile @@ -0,0 +1,35 @@ +# ---------------------------------- +# Environment: debian +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH node:16-bookworm + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN useradd -m -d /home/container -s /bin/bash container + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y g++ gcc libgcc-s1 lib32gcc-s1 gdb libstdc++6 libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-traditional telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig1 libicu72 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata libgdiplus\ + python3 dnsutils build-essential coreutils jq pcregrep tini + +RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ + && dpkg -i packages-microsoft-prod.deb \ + && apt update -y \ + && apt install -y dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 libgdiplus + +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/altv/entrypoint.sh b/games/altv/entrypoint.sh new file mode 100644 index 0000000..7081526 --- /dev/null +++ b/games/altv/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# 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} diff --git a/games/arma3/Dockerfile b/games/arma3/Dockerfile new file mode 100644 index 0000000..edf890f --- /dev/null +++ b/games/arma3/Dockerfile @@ -0,0 +1,58 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bullseye-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +## Update base packages and install dependencies +ENV DEBIAN_FRONTEND=noninteractive +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y \ + curl \ + tzdata \ + locales \ + iproute2 \ + gettext-base \ + ca-certificates \ + numactl \ + libssl-dev \ + lib32gcc-s1 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 \ + libstdc++6 \ + libstdc++6:i386 \ + lib32stdc++6 \ + libnss-wrapper \ + libnss-wrapper:i386 \ + libtbb2 \ + libtbb2:i386 \ + tini + +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + +## Prepare NSS Wrapper for the entrypoint as a workaround for Arma 3 requiring a valid UID +ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group +RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} +ADD passwd.template /passwd.template + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +## Copy over entrypoint.sh and set permissions +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +## Start with Tini to pass future stop signals correctly +STOPSIGNAL SIGINT +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/arma3/LICENSE.txt b/games/arma3/LICENSE.txt new file mode 100644 index 0000000..ce56bf1 --- /dev/null +++ b/games/arma3/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-2021 Pterodactyl Software + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/games/arma3/README.md b/games/arma3/README.md new file mode 100644 index 0000000..96bcb4f --- /dev/null +++ b/games/arma3/README.md @@ -0,0 +1,2 @@ +# Arma 3 +Docker container designed to run Bohemia Interactive's Arma 3 dedicated server. diff --git a/games/arma3/entrypoint.sh b/games/arma3/entrypoint.sh new file mode 100644 index 0000000..db803b6 --- /dev/null +++ b/games/arma3/entrypoint.sh @@ -0,0 +1,414 @@ +#!/bin/bash + +## File: Pterodactyl Arma 3 Image - entrypoint.sh +## Author: David Wolfe (Red-Thirten) +## Contributors: Aussie Server Hosts (https://aussieserverhosts.com/), Stephen White (SilK) +## Date: 2022/11/26 +## License: MIT License + +## === CONSTANTS === +STEAMCMD_DIR="./steamcmd" # SteamCMD's directory containing steamcmd.sh +WORKSHOP_DIR="./Steam/steamapps/workshop" # SteamCMD's directory containing workshop downloads +STEAMCMD_LOG="${STEAMCMD_DIR}/steamcmd.log" # Log file for SteamCMD +GAME_ID=107410 # SteamCMD ID for the Arma 3 GAME (not server). Only used for Workshop mod downloads. +EGG_URL='https://github.com/parkervcp/eggs/tree/master/game_eggs/steamcmd_servers/arma/arma3' # URL for Pterodactyl Egg & Info (only used as info to legacy users) + +# Color Codes +CYAN='\033[0;36m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +## === ENVIRONMENT VARS === +# STARTUP, STARTUP_PARAMS, STEAM_USER, STEAM_PASS, SERVER_BINARY, MOD_FILE, MODIFICATIONS, SERVERMODS, OPTIONALMODS, UPDATE_SERVER, CLEAR_CACHE, VALIDATE_SERVER, MODS_LOWERCASE, STEAMCMD_EXTRA_FLAGS, CDLC, STEAMCMD_APPID, HC_NUM, SERVER_PASSWORD, HC_HIDE, STEAMCMD_ATTEMPTS, BASIC_URL, DISABLE_MOD_UPDATES + +## === GLOBAL VARS === +# validateServer, extraFlags, updateAttempt, modifiedStartup, allMods, CLIENT_MODS + +## === DEFINE FUNCTIONS === +# +# Runs SteamCMD with specified variables and performs error handling. +function RunSteamCMD { #[Input: int server=0 mod=1 optional_mod=2; int id] + # Clear previous SteamCMD log + if [[ -f "${STEAMCMD_LOG}" ]]; then + rm -f "${STEAMCMD_LOG:?}" + fi + + updateAttempt=0 + while (( $updateAttempt < $STEAMCMD_ATTEMPTS )); do # Loop for specified number of attempts + # Increment attempt counter + updateAttempt=$((updateAttempt+1)) + + if (( $updateAttempt > 1 )); then # Notify if not first attempt + echo -e "\t${YELLOW}Re-Attempting download/update in 3 seconds...${NC} (Attempt ${CYAN}${updateAttempt}${NC} of ${CYAN}${STEAMCMD_ATTEMPTS}${NC})\n" + sleep 3 + fi + + # Check if updating server or mod + if [[ $1 == 0 ]]; then # Server + numactl --physcpubind=+0 ${STEAMCMD_DIR}/steamcmd.sh +force_install_dir /home/container "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +app_update $2 $extraFlags $validateServer +quit | tee -a "${STEAMCMD_LOG}" + else # Mod + numactl --physcpubind=+0 ${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +workshop_download_item $GAME_ID $2 +quit | tee -a "${STEAMCMD_LOG}" + fi + + # Error checking for SteamCMD + steamcmdExitCode=${PIPESTATUS[0]} + # Catch errors (ignore setlocale, SDL, steamservice, thread priority, and libcurl warnings) + loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread\|libcurl") + if [[ -n ${loggedErrors} ]]; then + # Soft errors + if [[ -n $(grep -i "Timeout downloading item" "${STEAMCMD_LOG}") ]]; then # Mod download timeout + echo -e "\n${YELLOW}[UPDATE]: ${NC}Timeout downloading Steam Workshop mod: \"${CYAN}${modName}${NC}\" (${CYAN}${2}${NC})" + echo -e "\t(This is expected for particularly large mods)" + elif [[ -n $(grep -i "0x402\|0x6\|0x602" "${STEAMCMD_LOG}") ]]; then # Connection issue with Steam + echo -e "\n${YELLOW}[UPDATE]: ${NC}Connection issue with Steam servers." + echo -e "\t(Steam servers may currently be down, or a connection cannot be made reliably)" + # Hard errors + elif [[ -n $(grep -i "Password check for AppId" "${STEAMCMD_LOG}") ]]; then # Incorrect beta branch password + echo -e "\n${RED}[UPDATE]: ${YELLOW}Incorrect password given for beta branch. ${CYAN}Skipping download...${NC}" + echo -e "\t(Check your \"[ADVANCED] EXTRA FLAGS FOR STEAMCMD\" startup parameter)" + break + # Fatal errors + elif [[ -n $(grep -i "Invalid Password\|two-factor\|No subscription" "${STEAMCMD_LOG}") ]]; then # Wrong username/password, Steam Guard is turned on, or host is using anonymous account + echo -e "\n${RED}[UPDATE]: Cannot login to Steam - Improperly configured account and/or credentials" + echo -e "\t${YELLOW}Please contact your administrator/host and give them the following message:${NC}" + echo -e "\t${CYAN}Your Egg, or your client's server, is not configured with valid Steam credentials.${NC}" + echo -e "\t${CYAN}Either the username/password is wrong, or Steam Guard is not properly configured" + echo -e "\t${CYAN}according to this egg's documentation/README.${NC}\n" + exit 1 + elif [[ -n $(grep -i "Download item" "${STEAMCMD_LOG}") ]]; then # Steam account does not own base game for mod downloads, or unknown + echo -e "\n${RED}[UPDATE]: Cannot download mod - Download failed" + echo -e "\t${YELLOW}While unknown, this error is likely due to your host's Steam account not owning the base game.${NC}" + echo -e "\t${YELLOW}(Please contact your administrator/host if this issue persists)${NC}\n" + exit 1 + elif [[ -n $(grep -i "0x202\|0x212" "${STEAMCMD_LOG}") ]]; then # Not enough disk space + echo -e "\n${RED}[UPDATE]: Unable to complete download - Not enough storage" + echo -e "\t${YELLOW}You have run out of your allotted disk space.${NC}" + echo -e "\t${YELLOW}Please contact your administrator/host for potential storage upgrades.${NC}\n" + exit 1 + elif [[ -n $(grep -i "0x606" "${STEAMCMD_LOG}") ]]; then # Disk write failure + echo -e "\n${RED}[UPDATE]: Unable to complete download - Disk write failure" + echo -e "\t${YELLOW}This is normally caused by directory permissions issues," + echo -e "\t${YELLOW}but could be a more serious hardware issue.${NC}" + echo -e "\t${YELLOW}(Please contact your administrator/host if this issue persists)${NC}\n" + exit 1 + else # Unknown caught error + echo -e "\n${RED}[UPDATE]: ${YELLOW}An unknown error has occurred with SteamCMD. ${CYAN}Skipping download...${NC}" + echo -e "SteamCMD Errors:\n${loggedErrors}" + echo -e "\t${YELLOW}(Please contact your administrator/host if this issue persists)${NC}\n" + break + fi + elif [[ $steamcmdExitCode != 0 ]]; then # Unknown fatal error + echo -e "\n${RED}[UPDATE]: SteamCMD has crashed for an unknown reason!${NC} (Exit code: ${CYAN}${steamcmdExitCode}${NC})" + echo -e "\t${YELLOW}(Please contact your administrator/host for support)${NC}\n" + cp -r /tmp/dumps /home/container/dumps + exit $steamcmdExitCode + else # Success! + if [[ $1 == 0 ]]; then # Server + echo -e "\n${GREEN}[UPDATE]: Game server is up to date!${NC}" + else # Mod + # Move the downloaded mod to the root directory, and replace existing mod if needed + mkdir -p ./@$2 + rm -rf ./@$2/* + mv -f ${WORKSHOP_DIR}/content/$GAME_ID/$2/* ./@$2 + rm -d ${WORKSHOP_DIR}/content/$GAME_ID/$2 + # Make the mods contents all lowercase + ModsLowercase @$2 + # Move any .bikey's to the keys directory + echo -e "\tMoving any mod ${CYAN}.bikey${NC} files to the ${CYAN}~/keys/${NC} folder..." + if [[ $1 == 1 ]]; then + find ./@$2 -name "*.bikey" -type f -exec cp {} ./keys \; + else + # Give optional mod keys a custom name which can be checked later for deleting unconfigured mods + for file in $(find ./@$2 -name "*.bikey" -type f); do + filename=$(basename ${file}) + + cp $file ./keys/optional_$2_${filename} + + done; + + echo -e "\tMod with ID $2 is an optional mod. Deleting original mod download folder..." + rm -r ./@$2 + + # Recreate a directory so time-based detection of auto updates works correctly + mkdir ./@$2_optional + fi + echo -e "${GREEN}[UPDATE]: Mod download/update successful!${NC}" + fi + break + fi + if (( $updateAttempt == $STEAMCMD_ATTEMPTS )); then # Notify if failed last attempt + if [[ $1 == 0 ]]; then # Server + echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete game server update. ${CYAN}Skipping...${NC}" + echo -e "\t(Please try again at a later time)" + sleep 3 + else # Mod + echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete mod download/update. ${CYAN}Skipping...${NC}" + echo -e "\t(You may try again later, or manually upload this mod to your server via SFTP)" + sleep 3 + fi + fi + done +} + +# Takes a directory (string) as input, and recursively makes all files & folders lowercase. +function ModsLowercase { + echo -e "\n\tMaking mod ${CYAN}$1${NC} files/folders lowercase..." + for SRC in `find ./$1 -depth` + do + DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'` + if [ "${SRC}" != "${DST}" ] + then + [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" + fi + done +} + +# Removes duplicate items from a semicolon delimited string +function RemoveDuplicates { #[Input: str - Output: printf of new str] + if [[ -n $1 ]]; then # If nothing to compare, skip to prevent extra semicolon being returned + echo $1 | sed -e 's/;/\n/g' | sort -u | xargs printf '%s;' + fi +} + +# === ENTRYPOINT START === + +# Wait for the container to fully initialize +sleep 1 + +# 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 + +# Check for old eggs +if [[ -z ${VALIDATE_SERVER} ]]; then # VALIDATE_SERVER was not in the previous version + echo -e "\n${RED}[STARTUP_ERR]: Please contact your administrator/host for support, and give them the following message:${NC}\n" + echo -e "\t${CYAN}Your Arma 3 Egg is outdated and no longer supported.${NC}" + echo -e "\t${CYAN}Please download the latest version at the following link, and install it in your panel:${NC}" + echo -e "\t${CYAN}${EGG_URL}${NC}\n" + exit 1 +fi + +# Collect and parse all specified mods +if [[ -n ${MODIFICATIONS} ]] && [[ ${MODIFICATIONS} != *\; ]]; then # Add manually specified mods to the client-side mods list, while checking for trailing semicolon + CLIENT_MODS="${MODIFICATIONS};" +else + CLIENT_MODS=${MODIFICATIONS} +fi +if [[ -f ${MOD_FILE} ]] && [[ -n "$(cat ${MOD_FILE} | grep 'Created by Arma 3 Launcher')" ]]; then # If the mod list file exists and is valid, parse and add mods to the client-side mods list + CLIENT_MODS+=$(cat ${MOD_FILE} | grep 'id=' | cut -d'=' -f3 | cut -d'"' -f1 | xargs printf '@%s;') +elif [[ -n "${MOD_FILE}" ]]; then # If MOD_FILE is not null, warn user file is missing or invalid + echo -e "\n${YELLOW}[STARTUP_WARN]: Arma 3 Modlist file \"${CYAN}${MOD_FILE}${YELLOW}\" could not be found, or is invalid!${NC}" + echo -e "\tEnsure your uploaded modlist's file name matches your Startup Parameter." + echo -e "\tOnly files exported from an Arma 3 Launcher are permitted." + if [[ -n "${CLIENT_MODS}" ]]; then + echo -e "\t${CYAN}Reverting to the manual mod list...${NC}" + fi +fi +if [[ -n ${SERVERMODS} ]] && [[ ${SERVERMODS} != *\; ]]; then # Add server mods to the master mods list, while checking for trailing semicolon + allMods="${SERVERMODS};" +else + allMods=${SERVERMODS} +fi +if [[ -n ${OPTIONALMODS} ]] && [[ ${OPTIONALMODS} != *\; ]]; then # Add specified optional mods to the mods list, while checking for trailing semicolon + allMods+="${OPTIONALMODS};" +else + allMods+=${OPTIONALMODS} +fi +allMods+=$CLIENT_MODS # Add all client-side mods to the master mod list +CLIENT_MODS=$(RemoveDuplicates ${CLIENT_MODS}) # Remove duplicate mods from CLIENT_MODS, if present +allMods=$(RemoveDuplicates ${allMods}) # Remove duplicate mods from allMods, if present +allMods=$(echo $allMods | sed -e 's/;/ /g') # Convert from string to array + +# Update everything (server and mods), if specified +if [[ ${UPDATE_SERVER} == 1 ]]; then + echo -e "\n${GREEN}[STARTUP]: ${CYAN}Starting checks for all updates...${NC}" + echo -e "(It is okay to ignore any \"SDL\", \"steamservice\", and \"thread priority\" errors during this process)\n" + + ## Update game server + echo -e "${GREEN}[UPDATE]:${NC} Checking for game server updates with App ID: ${CYAN}${STEAMCMD_APPID}${NC}..." + + if [[ ${VALIDATE_SERVER} == 1 ]]; then # Validate will be added as a parameter if specified + echo -e "\t${CYAN}File validation enabled.${NC} (This may take extra time to complete)" + validateServer="validate" + else + validateServer="" + fi + + # Determine what extra flags should be set + if [[ -n ${STEAMCMD_EXTRA_FLAGS} ]]; then + echo -e "\t(${YELLOW}Advanced${NC}) Extra SteamCMD flags specified: ${CYAN}${STEAMCMD_EXTRA_FLAGS}${NC}\n" + extraFlags=${STEAMCMD_EXTRA_FLAGS} + elif [[ ${CDLC} == 1 ]]; then + echo -e "\t${CYAN}Download/Update Creator DLC server files enabled.${NC}\n" + extraFlags="-beta creatordlc" + else + echo -e "" + extraFlags="" + fi + + RunSteamCMD 0 ${STEAMCMD_APPID} + + ## Update mods + if [[ -n $allMods ]] && [[ ${DISABLE_MOD_UPDATES} != 1 ]]; then + echo -e "\n${GREEN}[UPDATE]:${NC} Checking all ${CYAN}Steam Workshop mods${NC} for updates..." + for modID in $(echo $allMods | sed -e 's/@//g') + do + if [[ $modID =~ ^[0-9]+$ ]]; then # Only check mods that are in ID-form + # If a mod is defined in OPTIONALMODS, and is not defined in CLIENT_MODS or SERVERMODS, then treat as an optional mod + # Optional mods are given a different directory which is checked to see if a new update is available. This is to ensure + # if an optional mod is switched to be a standard client-side mod, this script will redownload the mod + if [[ "${OPTIONALMODS}" == *"@${modID};"* ]] && [[ "${CLIENT_MODS}" != *"@${modID};"* ]] && [[ "${SERVERMODS}" != *"@${modID};"* ]]; then + modType=2 + modDir=@${modID}_optional + else + modType=1 + modDir=@${modID} + fi + + # Get mod's latest update in epoch time from its Steam Workshop changelog page + latestUpdate=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep '

$(find $modDir | head -1 | xargs stat -c%Y) ) ]]; then + # Get the mod's name from the Workshop page as well + modName=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep 'workshopItemTitle' | cut -d'>' -f2 | cut -d'<' -f1) + if [[ -z $modName ]]; then # Set default name if unavailable + modName="[NAME UNAVAILABLE]" + fi + if [[ ! -d $modDir ]]; then + echo -e "\n${GREEN}[UPDATE]:${NC} Downloading new Mod: \"${CYAN}${modName}${NC}\" (${CYAN}${modID}${NC})" + else + echo -e "\n${GREEN}[UPDATE]:${NC} Mod update found for: \"${CYAN}${modName}${NC}\" (${CYAN}${modID}${NC})" + fi + if [[ -n $latestUpdate ]] && [[ $latestUpdate =~ ^[0-9]+$ ]]; then # Notify last update date, if valid + echo -e "\tMod was last updated: ${CYAN}$(date -d @${latestUpdate})${NC}" + fi + + # Delete SteamCMD appworkshop cache before running to avoid mod download failures + echo -e "\tClearing SteamCMD appworkshop cache..." + rm -f ${WORKSHOP_DIR}/appworkshop_$GAME_ID.acf + + echo -e "\tAttempting mod update/download via SteamCMD...\n" + RunSteamCMD $modType $modID + fi + fi + done + + # Check over key files for unconfigured optional mods' .bikey files + for keyFile in $(find ./keys -name "*.bikey" -type f); do + keyFileName=$(basename ${keyFile}) + + # If the key file is using the optional mod file name + if [[ "${keyFileName}" == "optional_"* ]]; then + modID=$(echo "${keyFileName}" | cut -d _ -f 2) + + # If mod is not in optional mods, delete it + # If a mod is configured in CLIENT_MODS or SERVERMODS, we should still delete this file + # as a new file will have been copied that does not follow the naming scheme + if [[ "${OPTIONALMODS}" != *"@${modID};"* ]]; then + + # We only need to let the user know the key file is being deleted if this mod is no longer configured at all. + # If CLIENT_MODS contains the mod ID, we'd just confuse the user by telling them we are deleting the optional .bikey file + if [[ "${CLIENT_MODS}" != *"@${modID};"* ]]; then + echo -e "\tKey file and directory for unconfigured optional mod ${CYAN}${modID}${NC} is being deleted..." + fi + + # Delete the optional mod .bikey file and directory + rm ${keyFile} + rmdir ./@${modID}_optional 2> /dev/null + fi + fi + done; + + echo -e "${GREEN}[UPDATE]:${NC} Steam Workshop mod update check ${GREEN}complete${NC}!" + fi +fi + +# Check if specified server binary exists. +if [[ ! -f ./${SERVER_BINARY} ]]; then + echo -e "\n${RED}[STARTUP_ERR]: Specified Arma 3 server binary could not be found in the root directory!${NC}" + echo -e "${YELLOW}Please do the following to resolve this issue:${NC}" + echo -e "\t${CYAN}- Double check your \"Server Binary\" Startup Variable is correct.${NC}" + echo -e "\t${CYAN}- Ensure your server has properly installed/updated without errors (reinstalling/updating again may help).${NC}" + echo -e "\t${CYAN}- Use the File Manager to check that your specified server binary file is not missing from the root directory.${NC}\n" + exit 1 +fi + +# Make mods lowercase, if specified +if [[ ${MODS_LOWERCASE} == "1" ]]; then + for modDir in $allMods + do + ModsLowercase $modDir + done +fi + +# Define the log file path with a timestamp +LOG_FILE="/home/container/serverprofile/rpt/arma3server_$(date '+%m_%d_%Y_%H%M%S').rpt" + +# Ensure the logs directory exists +mkdir -p /home/container/serverprofile/rpt + +# Clear HC cache, if specified +if [[ ${CLEAR_CACHE} == "1" ]]; then + echo -e "\n${GREEN}[STARTUP]: ${CYAN}Clearing Headless Client profiles cache...${NC}" + for profileDir in ./serverprofile/home/* + do + [ "$profileDir" = "./serverprofile/home/Player" ] && continue + rm -rf $profileDir + done +fi + +# Check if basic.cfg exists, and download if not (Arma really doesn't like it missing for some reason) +if [[ ! -f ./basic.cfg ]]; then + echo -e "\n${YELLOW}[STARTUP_WARN]: Basic Network Configuration file \"${CYAN}basic.cfg${YELLOW}\" is missing!${NC}" + echo -e "\t${YELLOW}Downloading default file for use instead...${NC}" + curl -sSL ${BASIC_URL} -o ./basic.cfg +fi + +# Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile) +export USER_ID=$(id -u) +export GROUP_ID=$(id -g) +envsubst < /passwd.template > ${NSS_WRAPPER_PASSWD} + +if [[ ${SERVER_BINARY} == *"x64"* ]]; then # Check which libnss-wrapper architecture to run, based off the server binary name + export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so +else + export LD_PRELOAD=/usr/lib/i386-linux-gnu/libnss_wrapper.so +fi + +# Replace Startup Variables +modifiedStartup=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` + +# Start Headless Clients if applicable +if [[ ${HC_NUM} > 0 ]]; then + echo -e "\n${GREEN}[STARTUP]:${NC} Starting ${CYAN}${HC_NUM}${NC} Headless Client(s)." + for i in $(seq ${HC_NUM}) + do + if [[ ${HC_HIDE} == "1" ]]; + then + ./${SERVER_BINARY} -client -connect=127.0.0.1 -port=${SERVER_PORT} -password="${SERVER_PASSWORD}" -profiles=./serverprofile -bepath=./battleye -mod="${CLIENT_MODS}" ${STARTUP_PARAMS} > /dev/null 2>&1 & + else + ./${SERVER_BINARY} -client -connect=127.0.0.1 -port=${SERVER_PORT} -password="${SERVER_PASSWORD}" -profiles=./serverprofile -bepath=./battleye -mod="${CLIENT_MODS}" ${STARTUP_PARAMS} & + fi + echo -e "${GREEN}[STARTUP]:${CYAN} Headless Client $i${NC} launched." + done +fi + +# Start the Server +echo -e "\n${GREEN}[STARTUP]:${NC} Starting server with the following startup command:" +echo -e "${CYAN}${modifiedStartup}${NC}\n" +if [[ "$STARTUP_PARAMS" == *"-noLogs"* ]]; then + ${modifiedStartup} +else + ${modifiedStartup} 2>&1 | tee -a "$LOG_FILE" +fi + +if [ $? -ne 0 ]; then + echo -e "\n${RED}PTDL_CONTAINER_ERR: There was an error while attempting to run the start command.${NC}\n" + exit 1 +fi diff --git a/games/arma3/passwd.template b/games/arma3/passwd.template new file mode 100644 index 0000000..c30c8a1 --- /dev/null +++ b/games/arma3/passwd.template @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin +bin:x:2:2:bin:/bin:/usr/sbin/nologin +sys:x:3:3:sys:/dev:/usr/sbin/nologin +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/usr/sbin/nologin +man:x:6:12:man:/var/cache/man:/usr/sbin/nologin +lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin +mail:x:8:8:mail:/var/mail:/usr/sbin/nologin +news:x:9:9:news:/var/spool/news:/usr/sbin/nologin +uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin +proxy:x:13:13:proxy:/bin:/usr/sbin/nologin +www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin +backup:x:34:34:backup:/var/backups:/usr/sbin/nologin +list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin +irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin +nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin +systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false +systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false +systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false +systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false +syslog:x:104:108::/home/syslog:/bin/false +messagebus:x:106:109::/var/run/dbus:/bin/false +bind:x:108:112::/var/cache/bind:/bin/false +${USER}:x:${USER_ID}:${GROUP_ID}:${USER}:${HOME}:/bin/bash \ No newline at end of file diff --git a/games/dayz/Dockerfile b/games/dayz/Dockerfile new file mode 100644 index 0000000..5803e12 --- /dev/null +++ b/games/dayz/Dockerfile @@ -0,0 +1,60 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +## Update base packages and install dependencies +ENV DEBIAN_FRONTEND=noninteractive +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y \ + curl \ + tzdata \ + locales \ + iproute2 \ + gettext-base \ + ca-certificates \ + libssl-dev \ + lib32gcc-s1 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 \ + libstdc++6 \ + libstdc++6:i386 \ + lib32stdc++6 \ + libcap2 \ + libnss-wrapper \ + tini + +## install rcon client (bercon) +RUN cd /tmp/ \ + && curl -sSL https://github.com/WoozyMasta/bercon/releases/download/1.0.0/bercon > bercon \ + && mv bercon /usr/local/bin/ \ + && chmod +x /usr/local/bin/bercon + +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + +## Prepare NSS Wrapper for the entrypoint as a workaround for DayZ requiring a valid UID +ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group +RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} +ADD passwd.template /passwd.template + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +## Copy over and execute entrypoint.sh via Tini +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/dayz/README.md b/games/dayz/README.md new file mode 100644 index 0000000..e7d05f2 --- /dev/null +++ b/games/dayz/README.md @@ -0,0 +1,2 @@ +# DayZ +Docker container designed to run Bohemia Interactive's DayZ dedicated server. diff --git a/games/dayz/entrypoint.sh b/games/dayz/entrypoint.sh new file mode 100644 index 0000000..af96c8b --- /dev/null +++ b/games/dayz/entrypoint.sh @@ -0,0 +1,293 @@ +#!/bin/bash + +## File: DayZ Image - entrypoint.sh +## Author: David Wolfe (Red-Thirten) +## Contributors: Aussie Server Hosts (https://aussieserverhosts.com/) +## Date: 2024/06/05 +## License: MIT License + +## === CONSTANTS === +STEAMCMD_DIR="./steamcmd" # SteamCMD's directory containing steamcmd.sh +WORKSHOP_DIR="./Steam/steamapps/workshop" # SteamCMD's directory containing workshop downloads +STEAMCMD_LOG="${STEAMCMD_DIR}/steamcmd.log" # Log file for SteamCMD +GAME_ID=221100 # SteamCMD ID for the DayZ GAME (not server). Only used for Workshop mod downloads. + +# Color Codes +CYAN='\033[0;36m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +## === ENVIRONMENT VARS === +# STARTUP, STARTUP_PARAMS, STEAM_USER, STEAM_PASS, SERVER_BINARY, MOD_FILE, MODIFICATIONS, SERVERMODS, UPDATE_SERVER, VALIDATE_SERVER, MODS_LOWERCASE, STEAMCMD_EXTRA_FLAGS, STEAMCMD_APPID, SERVER_PASSWORD, STEAMCMD_ATTEMPTS, DISABLE_MOD_UPDATES + +## === GLOBAL VARS === +# validateServer, extraFlags, updateAttempt, modifiedStartup, allMods, CLIENT_MODS + +## === DEFINE FUNCTIONS === + +# Runs SteamCMD with specified variables and performs error handling. +function RunSteamCMD { #[Input: int server=0 mod=1; int id] + # Clear previous SteamCMD log + if [[ -f "${STEAMCMD_LOG}" ]]; then + rm -f "${STEAMCMD_LOG:?}" + fi + + updateAttempt=0 + while (( $updateAttempt < $STEAMCMD_ATTEMPTS )); do # Loop for specified number of attempts + # Increment attempt counter + updateAttempt=$((updateAttempt+1)) + + if (( $updateAttempt > 1 )); then # Notify if not first attempt + echo -e "\t${YELLOW}Re-Attempting download/update in 3 seconds...${NC} (Attempt ${CYAN}${updateAttempt}${NC} of ${CYAN}${STEAMCMD_ATTEMPTS}${NC})\n" + sleep 3 + fi + + # Check if updating server or mod + if [[ $1 == 0 ]]; then # Server + ${STEAMCMD_DIR}/steamcmd.sh +force_install_dir /home/container "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +app_update $2 $extraFlags $validateServer +quit | tee -a "${STEAMCMD_LOG}" + else # Mod + ${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +workshop_download_item $GAME_ID $2 +quit | tee -a "${STEAMCMD_LOG}" + fi + + # Error checking for SteamCMD + steamcmdExitCode=${PIPESTATUS[0]} + # Catch errors (ignore setlocale, SDL, steamservice, thread priority, and libcurl warnings) + loggedErrors=$(grep -i "error\|failed" "${STEAMCMD_LOG}" | grep -iv "setlocal\|SDL\|steamservice\|thread\|libcurl") + if [[ -n ${loggedErrors} ]]; then + # Soft errors + if [[ -n $(grep -i "Timeout downloading item" "${STEAMCMD_LOG}") ]]; then # Mod download timeout + echo -e "\n${YELLOW}[UPDATE]: ${NC}Timeout downloading Steam Workshop mod: \"${CYAN}${modName}${NC}\" (${CYAN}${2}${NC})" + echo -e "\t(This is expected for particularly large mods)" + elif [[ -n $(grep -i "0x402\|0x6\|0x602" "${STEAMCMD_LOG}") ]]; then # Connection issue with Steam + echo -e "\n${YELLOW}[UPDATE]: ${NC}Connection issue with Steam servers." + echo -e "\t(Steam servers may currently be down, or a connection cannot be made reliably)" + # Hard errors + elif [[ -n $(grep -i "Password check for AppId" "${STEAMCMD_LOG}") ]]; then # Incorrect beta branch password + echo -e "\n${RED}[UPDATE]: ${YELLOW}Incorrect password given for beta branch. ${CYAN}Skipping download...${NC}" + echo -e "\t(Check your \"[ADVANCED] EXTRA FLAGS FOR STEAMCMD\" startup parameter)" + break + # Fatal errors + elif [[ -n $(grep -i "Invalid Password\|two-factor\|No subscription" "${STEAMCMD_LOG}") ]]; then # Wrong username/password, Steam Guard is turned on, or host is using anonymous account + echo -e "\n${RED}[UPDATE]: Cannot login to Steam - Improperly configured account and/or credentials" + echo -e "\t${YELLOW}Please contact your administrator/host and give them the following message:${NC}" + echo -e "\t${CYAN}Your Egg, or your client's server, is not configured with valid Steam credentials.${NC}" + echo -e "\t${CYAN}Either the username/password is wrong, or Steam Guard is not properly configured\n\taccording to this egg's documentation/README.${NC}\n" + exit 1 + elif [[ -n $(grep -i "Download item" "${STEAMCMD_LOG}") ]]; then # Steam account does not own base game for mod downloads, or unknown + echo -e "\n${RED}[UPDATE]: Cannot download mod - Download failed" + echo -e "\t${YELLOW}While unknown, this error is likely due to your host's Steam account not owning the base game.${NC}" + echo -e "\t${YELLOW}(Please contact your administrator/host if this issue persists)${NC}\n" + exit 1 + elif [[ -n $(grep -i "0x202\|0x212" "${STEAMCMD_LOG}") ]]; then # Not enough disk space + echo -e "\n${RED}[UPDATE]: Unable to complete download - Not enough storage" + echo -e "\t${YELLOW}You have run out of your allotted disk space.${NC}" + echo -e "\t${YELLOW}Please contact your administrator/host for potential storage upgrades.${NC}\n" + exit 1 + elif [[ -n $(grep -i "0x606" "${STEAMCMD_LOG}") ]]; then # Disk write failure + echo -e "\n${RED}[UPDATE]: Unable to complete download - Disk write failure" + echo -e "\t${YELLOW}This is normally caused by directory permissions issues,\n\tbut could be a more serious hardware issue.${NC}" + echo -e "\t${YELLOW}(Please contact your administrator/host if this issue persists)${NC}\n" + exit 1 + else # Unknown caught error + echo -e "\n${RED}[UPDATE]: ${YELLOW}An unknown error has occurred with SteamCMD. ${CYAN}Skipping download...${NC}" + echo -e "\t(Please contact your administrator/host if this issue persists)" + break + fi + elif [[ $steamcmdExitCode != 0 ]]; then # Unknown fatal error + echo -e "\n${RED}[UPDATE]: SteamCMD has crashed for an unknown reason!${NC} (Exit code: ${CYAN}${steamcmdExitCode}${NC})" + echo -e "\t${YELLOW}(Please contact your administrator/host for support)${NC}\n" + cp -r /tmp/dumps /home/container/dumps + exit $steamcmdExitCode + else # Success! + if [[ $1 == 0 ]]; then # Server + echo -e "\n${GREEN}[UPDATE]: Game server is up to date!${NC}" + else # Mod + # Move the downloaded mod to the root directory, and replace existing mod if needed + mkdir -p ./@$2 + rm -rf ./@$2/* + mv -f ${WORKSHOP_DIR}/content/$GAME_ID/$2/* ./@$2 + rm -d ${WORKSHOP_DIR}/content/$GAME_ID/$2 + # Make the mods contents all lowercase + ModsLowercase @$2 + # Move any .bikey's to the keys directory + echo -e "\tMoving any mod ${CYAN}.bikey${NC} files to the ${CYAN}~/keys/${NC} folder..." + find ./@$2 -name "*.bikey" -type f -exec cp {} ./keys \; + echo -e "${GREEN}[UPDATE]: Mod download/update successful!${NC}" + fi + break + fi + if (( $updateAttempt == $STEAMCMD_ATTEMPTS )); then # Notify if failed last attempt + if [[ $1 == 0 ]]; then # Server + echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete game server update. ${CYAN}Skipping...${NC}" + echo -e "\t(Please try again at a later time)" + sleep 3 + else # Mod + echo -e "\t${RED}Final attempt made! ${YELLOW}Unable to complete mod download/update. ${CYAN}Skipping...${NC}" + echo -e "\t(You may try again later, or manually upload this mod to your server via SFTP)" + sleep 3 + fi + fi + done +} + +# Takes a directory (string) as input, and recursively makes all files & folders lowercase. +function ModsLowercase { + echo -e "\n\tMaking mod ${CYAN}$1${NC} files/folders lowercase..." + for SRC in `find ./$1 -depth` + do + DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'` + if [ "${SRC}" != "${DST}" ] + then + [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" + fi + done +} + +# Removes duplicate items from a semicolon delimited string +function RemoveDuplicates { #[Input: str - Output: printf of new str] + if [[ -n $1 ]]; then # If nothing to compare, skip to prevent extra semicolon being returned + echo $1 | sed -e 's/;/\n/g' | sort -u | xargs printf '%s;' + fi +} + +## === ENTRYPOINT START === + +# Wait for the container to fully initialize +sleep 1 + +# 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 + +# Collect and parse all specified mods +if [[ -n ${MODIFICATIONS} ]] && [[ ${MODIFICATIONS} != *\; ]]; then # Add manually specified mods to the client-side mods list, while checking for trailing semicolon + CLIENT_MODS="${MODIFICATIONS};" +else + CLIENT_MODS=${MODIFICATIONS} +fi +# If the mod list file exists and is valid, parse and add mods to the client-side mods list +if [[ -f ${MOD_FILE} ]] && [[ -n "$(cat ${MOD_FILE} | grep 'Created by DayZ Launcher')" ]]; then + CLIENT_MODS+=$(cat ${MOD_FILE} | grep 'id=' | cut -d'=' -f3 | cut -d'"' -f1 | xargs printf '@%s;') +elif [[ -n "${MOD_FILE}" ]]; then # If MOD_FILE is not null, warn user file is missing or invalid + echo -e "\n${YELLOW}[STARTUP_WARN]: DayZ Modlist file \"${CYAN}${MOD_FILE}${YELLOW}\" could not be found, or is invalid!${NC}" + echo -e "\tEnsure your uploaded modlist's file name matches your Startup Parameter." + echo -e "\tOnly files exported from a DayZ Launcher are permitted." + if [[ -n "${CLIENT_MODS}" ]]; then + echo -e "\t${CYAN}Reverting to the manual mod list...${NC}" + fi +fi +# Add server mods to the master mods list, while checking for trailing semicolon +if [[ -n ${SERVERMODS} ]] && [[ ${SERVERMODS} != *\; ]]; then + allMods="${SERVERMODS};" +else + allMods=${SERVERMODS} +fi +allMods+=$CLIENT_MODS # Add all client-side mods to the master mod list +CLIENT_MODS=$(RemoveDuplicates ${CLIENT_MODS}) # Remove duplicate mods from CLIENT_MODS, if present +allMods=$(RemoveDuplicates ${allMods}) # Remove duplicate mods from allMods, if present +allMods=$(echo $allMods | sed -e 's/;/ /g') # Convert from string to array + +# Update everything (server and mods), if specified +if [[ ${UPDATE_SERVER} == 1 ]]; then + echo -e "\n${GREEN}[STARTUP]: ${CYAN}Starting checks for all updates...${NC}" + echo -e "(It is okay to ignore any \"SDL\" and \"thread priority\" errors during this process)\n" + + ## Update game server + echo -e "${GREEN}[UPDATE]:${NC} Checking for game server updates with App ID: ${CYAN}${STEAMCMD_APPID}${NC}..." + + if [[ ${VALIDATE_SERVER} == 1 ]]; then # Validate will be added as a parameter if specified + echo -e "\t${CYAN}File validation enabled.${NC} (This may take extra time to complete)" + validateServer="validate" + else + validateServer="" + fi + + # Determine what extra flags should be set + if [[ -n ${STEAMCMD_EXTRA_FLAGS} ]]; then + echo -e "\t(${YELLOW}Advanced${NC}) Extra SteamCMD flags specified: ${CYAN}${STEAMCMD_EXTRA_FLAGS}${NC}\n" + extraFlags=${STEAMCMD_EXTRA_FLAGS} + else + echo -e "" + extraFlags="" + fi + + RunSteamCMD 0 ${STEAMCMD_APPID} + + ## Update mods + if [[ -n $allMods ]] && [[ ${DISABLE_MOD_UPDATES} != 1 ]]; then + echo -e "\n${GREEN}[UPDATE]:${NC} Checking all ${CYAN}Steam Workshop mods${NC} for updates..." + for modID in $(echo $allMods | sed -e 's/@//g') + do + if [[ $modID =~ ^[0-9]+$ ]]; then # Only check mods that are in ID-form + # Get mod's latest update in epoch time from its Steam Workshop changelog page + latestUpdate=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep '

$(find @$modID | head -1 | xargs stat -c%Y) ) ]]; then + # Get the mod's name from the Workshop page as well + modName=$(curl -sL https://steamcommunity.com/sharedfiles/filedetails/changelog/$modID | grep 'workshopItemTitle' | cut -d'>' -f2 | cut -d'<' -f1) + if [[ -z $modName ]]; then # Set default name if unavailable + modName="[NAME UNAVAILABLE]" + fi + if [[ ! -d @$modID ]]; then + echo -e "\n${GREEN}[UPDATE]:${NC} Downloading new Mod: \"${CYAN}${modName}${NC}\" (${CYAN}${modID}${NC})" + else + echo -e "\n${GREEN}[UPDATE]:${NC} Mod update found for: \"${CYAN}${modName}${NC}\" (${CYAN}${modID}${NC})" + fi + if [[ -n $latestUpdate ]] && [[ $latestUpdate =~ ^[0-9]+$ ]]; then # Notify last update date, if valid + echo -e "\tMod was last updated: ${CYAN}$(date -d @${latestUpdate})${NC}" + fi + + # Delete SteamCMD appworkshop cache before running to avoid mod download failures + echo -e "\tClearing SteamCMD appworkshop cache..." + rm -f ${WORKSHOP_DIR}/appworkshop_$GAME_ID.acf + + echo -e "\tAttempting mod update/download via SteamCMD...\n" + RunSteamCMD 1 $modID + fi + fi + done + echo -e "${GREEN}[UPDATE]:${NC} Steam Workshop mod update check ${GREEN}complete${NC}!" + fi +fi + +# Check if specified server binary exists. +if [[ ! -f ./${SERVER_BINARY} ]]; then + echo -e "\n${RED}[STARTUP_ERR]: Specified DayZ server binary could not be found in the root directory!${NC}" + echo -e "${YELLOW}Please do the following to resolve this issue:${NC}" + echo -e "\t${CYAN}- Double check your \"Server Binary\" Startup Variable is correct.${NC}" + echo -e "\t${CYAN}- Ensure your server has properly installed/updated without errors (reinstalling/updating again may help).${NC}" + echo -e "\t${CYAN}- Use the File Manager to check that your specified server binary file is not missing from the root directory.${NC}\n" + exit 1 +fi + +# Make mods lowercase, if specified +if [[ ${MODS_LOWERCASE} == "1" ]]; then + for modDir in $allMods + do + ModsLowercase $modDir + done +fi + +# Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile) +export USER_ID=$(id -u) +export GROUP_ID=$(id -g) +envsubst < /passwd.template > ${NSS_WRAPPER_PASSWD} +export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so + +# Replace Startup Variables +modifiedStartup=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` + +# Start the Server +echo -e "\n${GREEN}[STARTUP]:${NC} Starting server with the following startup command:" +echo -e "${CYAN}${modifiedStartup}${NC}\n" +${modifiedStartup} + +if [ $? -ne 0 ]; then + echo -e "\n${RED}[STARTUP_ERR]: There was an error while attempting to run the start command.${NC}\n" + exit 1 +fi diff --git a/games/dayz/passwd.template b/games/dayz/passwd.template new file mode 100644 index 0000000..c30c8a1 --- /dev/null +++ b/games/dayz/passwd.template @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin +bin:x:2:2:bin:/bin:/usr/sbin/nologin +sys:x:3:3:sys:/dev:/usr/sbin/nologin +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/usr/sbin/nologin +man:x:6:12:man:/var/cache/man:/usr/sbin/nologin +lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin +mail:x:8:8:mail:/var/mail:/usr/sbin/nologin +news:x:9:9:news:/var/spool/news:/usr/sbin/nologin +uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin +proxy:x:13:13:proxy:/bin:/usr/sbin/nologin +www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin +backup:x:34:34:backup:/var/backups:/usr/sbin/nologin +list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin +irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin +nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin +systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false +systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false +systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false +systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false +syslog:x:104:108::/home/syslog:/bin/false +messagebus:x:106:109::/var/run/dbus:/bin/false +bind:x:108:112::/var/cache/bind:/bin/false +${USER}:x:${USER_ID}:${GROUP_ID}:${USER}:${HOME}:/bin/bash \ No newline at end of file diff --git a/games/minetest/Dockerfile b/games/minetest/Dockerfile new file mode 100644 index 0000000..97da350 --- /dev/null +++ b/games/minetest/Dockerfile @@ -0,0 +1,21 @@ +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.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 0000000..e9001dd --- /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~ \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} diff --git a/games/mohaa/Dockerfile b/games/mohaa/Dockerfile new file mode 100644 index 0000000..8512124 --- /dev/null +++ b/games/mohaa/Dockerfile @@ -0,0 +1,12 @@ +FROM ghcr.io/parkervcp/yolks:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN dpkg --add-architecture i386 \ + && apt update && apt upgrade -y \ + && apt install -y lib32gcc-s1 lib32stdc++6 libstdc++5:i386 + + diff --git a/games/mohaa/entrypoint.sh b/games/mohaa/entrypoint.sh new file mode 100644 index 0000000..7081526 --- /dev/null +++ b/games/mohaa/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# 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} diff --git a/games/mta/Dockerfile b/games/mta/Dockerfile new file mode 100644 index 0000000..39a9f64 --- /dev/null +++ b/games/mta/Dockerfile @@ -0,0 +1,53 @@ +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:20.04 +ENV DEBIAN_FRONTEND=noninteractive + +## update base packages +RUN apt update && \ + apt upgrade -y + +## install dependencies +RUN apt install -y \ + tini \ + iproute2 \ + curl \ + git \ + zip \ + unzip \ + tar \ + xz-utils \ + libssl1.1 \ + apt-transport-https \ + openssl \ + default-libmysqlclient-dev \ + libreadline-dev \ + libncurses-dev \ + libtool \ + python3 \ + locales \ + ffmpeg \ + libc6 \ + binutils \ + liblua5.1-0 + +## configure locale +RUN update-locale lang=en_US.UTF-8 && \ + dpkg-reconfigure --frontend noninteractive locales + +## add container user +RUN useradd -m -d /home/container -s /bin/bash container + +# Set up user and working directory +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +# Set the stop signal +STOPSIGNAL SIGINT + +# Copy and set up the entrypoint script +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +# Define entrypoint and command +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/games/mta/entrypoint.sh b/games/mta/entrypoint.sh new file mode 100644 index 0000000..d09b408 --- /dev/null +++ b/games/mta/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e $(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 diff --git a/games/rust/Dockerfile b/games/rust/Dockerfile new file mode 100644 index 0000000..eec9799 --- /dev/null +++ b/games/rust/Dockerfile @@ -0,0 +1,41 @@ +FROM node:22-slim + +ARG DEBIAN_FRONTEND=noninteractive + +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y + +RUN apt install -y \ + lib32gcc-s1 \ + lib32stdc++6 \ + locales \ + unzip \ + curl \ + iproute2 \ + tzdata \ + libgdiplus \ + libsdl2-2.0-0:i386 + +RUN mkdir /wrapper \ + && npm install --prefix /wrapper ws + +# Set the locale +RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ + locale-gen +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +COPY --chown=container:container ./wrapper.js /wrapper/wrapper.js +RUN chmod +x /wrapper/wrapper.js + +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/games/rust/entrypoint.sh b/games/rust/entrypoint.sh new file mode 100644 index 0000000..2af3370 --- /dev/null +++ b/games/rust/entrypoint.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Wait for the container to fully initialize +sleep 1 + +# 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 + +## if auto_update is not set or to 1 update +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + # Allow for the staging branch to also update itself + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login anonymous +app_update 258550 $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) +quit +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi + +# Replace Startup Variables +MODIFIED_STARTUP=$(eval echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +if [[ "${FRAMEWORK}" == "carbon" ]]; then + # Carbon: https://github.com/CarbonCommunity/Carbon + echo "Updating Carbon..." + curl -sSL "https://github.com/CarbonCommunity/Carbon/releases/download/production_build/Carbon.Linux.Release.tar.gz" | tar zx + echo "Done updating Carbon!" + + export DOORSTOP_ENABLED=1 + export DOORSTOP_TARGET_ASSEMBLY="$(pwd)/carbon/managed/Carbon.Preloader.dll" + MODIFIED_STARTUP="LD_PRELOAD=$(pwd)/libdoorstop.so ${MODIFIED_STARTUP}" +elif [[ "${FRAMEWORK}" == "oxide-staging" ]]; then + echo "updating oxide-staging" + curl -sSL -o oxide-staging.zip "https://downloads.oxidemod.com/artifacts/Oxide.Rust/staging/Oxide.Rust-linux.zip" + unzip -o -q oxide-staging.zip + rm oxide-staging.zip + echo "Done updating oxide Staging" +elif [[ "$OXIDE" == "1" ]] || [[ "${FRAMEWORK}" == "oxide" ]]; then + # Oxide: https://github.com/OxideMod/Oxide.Rust + echo "Updating uMod..." + curl -sSL "https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip" > umod.zip + unzip -o -q umod.zip + rm umod.zip + echo "Done updating uMod!" +# else Vanilla, do nothing +fi + +# Fix for Rust not starting +export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd) + +# Run the Server +/wrapper/wrapper.js "${MODIFIED_STARTUP}" diff --git a/games/rust/wrapper.js b/games/rust/wrapper.js new file mode 100644 index 0000000..23d9f98 --- /dev/null +++ b/games/rust/wrapper.js @@ -0,0 +1,140 @@ +#!/usr/bin/env node + +var startupCmd = ""; +const fs = require("fs"); +fs.writeFile("latest.log", "", (err) => { + if (err) console.log("Callback error in appendFile:" + err); +}); + +var args = process.argv.splice(process.execArgv.length + 2); +for (var i = 0; i < args.length; i++) { + if (i === args.length - 1) { + startupCmd += args[i]; + } else { + startupCmd += args[i] + " "; + } +} + +if (startupCmd.length < 1) { + console.log("Error: Please specify a startup command."); + process.exit(); +} + +const seenPercentage = {}; + +function filter(data) { + const str = data.toString(); + if (str.startsWith("Loading Prefab Bundle ")) { // Rust seems to spam the same percentage, so filter out any duplicates. + const percentage = str.substr("Loading Prefab Bundle ".length); + if (seenPercentage[percentage]) return; + + seenPercentage[percentage] = true; + } + + console.log(str); +} + +var exec = require("child_process").exec; +console.log("Starting Rust..."); + +var exited = false; +const gameProcess = exec(startupCmd); +gameProcess.stdout.on('data', filter); +gameProcess.stderr.on('data', filter); +gameProcess.on('exit', function (code, signal) { + exited = true; + + if (code) { + console.log("Main game process exited with code " + code); + // process.exit(code); + } +}); + +function initialListener(data) { + const command = data.toString().trim(); + if (command === 'quit') { + gameProcess.kill('SIGTERM'); + } else { + console.log('Unable to run "' + command + '" due to RCON not being connected yet.'); + } +} +process.stdin.resume(); +process.stdin.setEncoding("utf8"); +process.stdin.on('data', initialListener); + +process.on('exit', function (code) { + if (exited) return; + + console.log("Received request to stop the process, stopping the game..."); + gameProcess.kill('SIGTERM'); +}); + +var waiting = true; +var poll = function () { + function createPacket(command) { + var packet = { + Identifier: -1, + Message: command, + Name: "WebRcon" + }; + return JSON.stringify(packet); + } + + var serverHostname = process.env.RCON_IP ? process.env.RCON_IP : "localhost"; + var serverPort = process.env.RCON_PORT; + var serverPassword = process.env.RCON_PASS; + var WebSocket = require("ws"); + var ws = new WebSocket("ws://" + serverHostname + ":" + serverPort + "/" + serverPassword); + + ws.on("open", function open() { + console.log("Connected to RCON. Generating the map now. Please wait until the server status switches to \"Running\"."); + waiting = false; + + // Hack to fix broken console output + ws.send(createPacket('status')); + + process.stdin.removeListener('data', initialListener); + gameProcess.stdout.removeListener('data', filter); + gameProcess.stderr.removeListener('data', filter); + process.stdin.on('data', function (text) { + ws.send(createPacket(text)); + }); + }); + + ws.on("message", function (data, flags) { + try { + var json = JSON.parse(data); + if (json !== undefined) { + if (json.Message !== undefined && json.Message.length > 0) { + console.log(json.Message); + const fs = require("fs"); + fs.appendFile("latest.log", "\n" + json.Message, (err) => { + if (err) console.log("Callback error in appendFile:" + err); + }); + } + } else { + console.log("Error: Invalid JSON received"); + } + } catch (e) { + if (e) { + console.log(e); + } + } + }); + + ws.on("error", function (err) { + waiting = true; + console.log("Waiting for RCON to come up..."); + setTimeout(poll, 5000); + }); + + ws.on("close", function () { + if (!waiting) { + console.log("Connection to server closed."); + + exited = true; + process.exit(); + } + }); +} +poll(); \ No newline at end of file diff --git a/games/samp/Dockerfile b/games/samp/Dockerfile new file mode 100644 index 0000000..70e3c24 --- /dev/null +++ b/games/samp/Dockerfile @@ -0,0 +1,33 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y upgrade +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y libstdc++6 lib32stdc++6 tar wget curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip tini \ + && apt install -y libtbb12:i386 libtbb-dev:i386 libicu-dev:i386 \ + && useradd -d /home/container -m container + +RUN mkdir -p /run/systemd && echo 'docker' > /run/systemd/container +RUN rm -rf /var/lib/apt/lists/* + + # Temp fix for things that still need libssl1.1 32 bit +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_i386.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_i386.deb && \ + rm libssl1.1_1.1.0g-2ubuntu4_i386.deb; \ + fi + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/samp/entrypoint.sh b/games/samp/entrypoint.sh new file mode 100644 index 0000000..e571765 --- /dev/null +++ b/games/samp/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` + +# 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} diff --git a/games/source/Dockerfile b/games/source/Dockerfile new file mode 100644 index 0000000..608ab78 --- /dev/null +++ b/games/source/Dockerfile @@ -0,0 +1,96 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +ENV DEBIAN_FRONTEND=noninteractive + +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y \ + curl \ + g++ \ + gcc \ + gdb \ + iproute2 \ + locales \ + net-tools \ + netcat-traditional \ + tar \ + telnet \ + tini \ + tzdata \ + wget \ + lib32gcc-s1 \ + lib32stdc++6 \ + lib32tinfo6 \ + lib32z1 \ + libcurl3-gnutls:i386 \ + libcurl4-gnutls-dev:i386 \ + libcurl4:i386 \ + libfontconfig1 \ + libgcc-11-dev \ + libgcc-12-dev \ + libncurses5:i386 \ + libsdl1.2debian \ + libsdl2-2.0-0:i386 \ + libssl-dev:i386 \ + libtinfo6:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Temp fix for things that still need libssl1.1 +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + rm libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \ + fi + +# Set the locale +RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ + locale-gen +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 + +# Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/source/entrypoint.sh b/games/source/entrypoint.sh new file mode 100644 index 0000000..2d9c3a9 --- /dev/null +++ b/games/source/entrypoint.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +# Wait for the container to fully initialize +sleep 1 + +# 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 + + +## just in case someone removed the defaults. +if [ "${STEAM_USER}" == "" ]; then + echo -e "steam user is not set.\n" + echo -e "Using anonymous user.\n" + STEAM_USER=anonymous + STEAM_PASS="" + STEAM_AUTH="" +else + echo -e "user set to ${STEAM_USER}" +fi + +## if auto_update is not set or to 1 update +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + # Update Source Server + if [ ! -z ${SRCDS_APPID} ]; then + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + else + echo -e "No appid set. Starting Server" + fi + +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/games/thebattleforwesnoth/Dockerfile b/games/thebattleforwesnoth/Dockerfile new file mode 100644 index 0000000..8641f2c --- /dev/null +++ b/games/thebattleforwesnoth/Dockerfile @@ -0,0 +1,25 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +## update base packages +RUN apt update && apt upgrade -y + +## install dependencies +RUN apt install -y gcc g++ libgcc1 libc++-dev gdb libc6 git tar zip unzip libssl-dev tini iproute2 \ + libboost-filesystem-dev libboost-iostreams-dev libboost-locale-dev libboost-random-dev libboost-regex-dev libboost-program-options-dev libboost-system-dev libboost-coroutine-dev libboost-graph-dev \ + libsdl2-dev libcurl4-openssl-dev libcairo2-dev libvorbis-dev libbz2-dev zlib1g-dev libssl-dev libcrypto++-dev openssl cmake libsdl2-image-dev libsdl2-mixer-dev libsdl-pango-dev + + +## add container user +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/thebattleforwesnoth/entrypoint.sh b/games/thebattleforwesnoth/entrypoint.sh new file mode 100644 index 0000000..9219410 --- /dev/null +++ b/games/thebattleforwesnoth/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# 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} diff --git a/games/valheim/Dockerfile b/games/valheim/Dockerfile new file mode 100644 index 0000000..6a2bfd2 --- /dev/null +++ b/games/valheim/Dockerfile @@ -0,0 +1,42 @@ +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +## add container user +RUN useradd -m -d /home/container -s /bin/bash container + + + +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y libcurl4-gnutls-dev:i386 libssl3:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 \ + gcc g++ libgcc1 libc++-dev gdb libc6 curl tar iproute2 net-tools libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig locales libcurl3-gnutls libpulse-dev libpulse0 libnss-wrapper gettext tini + +## configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + + +ENV USER=container HOME=/home/container +WORKDIR /home/container + + + +## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim requiring a valid UID +ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group +RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} +ADD passwd.template /passwd.template + + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/valheim/entrypoint.sh b/games/valheim/entrypoint.sh new file mode 100644 index 0000000..dfb02b3 --- /dev/null +++ b/games/valheim/entrypoint.sh @@ -0,0 +1,46 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + + +## just in case someone removed the defaults. +if [ "${STEAM_USER}" == "" ]; then + echo -e "steam user is not set.\n" + echo -e "Using anonymous user.\n" + STEAM_USER=anonymous + STEAM_PASS="" + STEAM_AUTH="" +else + echo -e "user set to ${STEAM_USER}" +fi + +## if auto_update is not set or to 1 update +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + # Update Source Server + if [ ! -z ${SRCDS_APPID} ]; then + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + else + echo -e "No appid set. Starting Server" + fi + +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi + + +# Setup NSS Wrapper for use ($NSS_WRAPPER_PASSWD and $NSS_WRAPPER_GROUP have been set by the Dockerfile) +export USER_ID=$(id -u) +export GROUP_ID=$(id -g) +envsubst < /passwd.template > ${NSS_WRAPPER_PASSWD} + +export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so + +# 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} diff --git a/games/valheim/passwd.template b/games/valheim/passwd.template new file mode 100644 index 0000000..a649ace --- /dev/null +++ b/games/valheim/passwd.template @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin +bin:x:2:2:bin:/bin:/usr/sbin/nologin +sys:x:3:3:sys:/dev:/usr/sbin/nologin +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/usr/sbin/nologin +man:x:6:12:man:/var/cache/man:/usr/sbin/nologin +lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin +mail:x:8:8:mail:/var/mail:/usr/sbin/nologin +news:x:9:9:news:/var/spool/news:/usr/sbin/nologin +uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin +proxy:x:13:13:proxy:/bin:/usr/sbin/nologin +www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin +backup:x:34:34:backup:/var/backups:/usr/sbin/nologin +list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin +irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin +nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin +systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false +systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false +systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false +systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false +syslog:x:104:108::/home/syslog:/bin/false +messagebus:x:106:109::/var/run/dbus:/bin/false +bind:x:108:112::/var/cache/bind:/bin/false +${USER_NAME}:x:${USER_ID}:${GROUP_ID}:${USER_NAME}:${HOME}:/bin/bash diff --git a/go/1.14/Dockerfile b/go/1.14/Dockerfile new file mode 100644 index 0000000..2ccc476 --- /dev/null +++ b/go/1.14/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.14-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.15/Dockerfile b/go/1.15/Dockerfile new file mode 100644 index 0000000..277b835 --- /dev/null +++ b/go/1.15/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.15-alpine + +LABEL author="Matthew Penner" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.16/Dockerfile b/go/1.16/Dockerfile new file mode 100644 index 0000000..9d117bd --- /dev/null +++ b/go/1.16/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.16-alpine + +LABEL author="Matthew Penner" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.17/Dockerfile b/go/1.17/Dockerfile new file mode 100644 index 0000000..37f8814 --- /dev/null +++ b/go/1.17/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.17-alpine + +LABEL author="Matthew Penner" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.18/Dockerfile b/go/1.18/Dockerfile new file mode 100644 index 0000000..591752c --- /dev/null +++ b/go/1.18/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.18-alpine + +LABEL author="Matthew Penner" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.19/Dockerfile b/go/1.19/Dockerfile new file mode 100644 index 0000000..b23cca9 --- /dev/null +++ b/go/1.19/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.19-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.20/Dockerfile b/go/1.20/Dockerfile new file mode 100644 index 0000000..9c8defb --- /dev/null +++ b/go/1.20/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.20-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.21/Dockerfile b/go/1.21/Dockerfile new file mode 100644 index 0000000..f2fa978 --- /dev/null +++ b/go/1.21/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.21-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.22/Dockerfile b/go/1.22/Dockerfile new file mode 100644 index 0000000..6ffdb8d --- /dev/null +++ b/go/1.22/Dockerfile @@ -0,0 +1,38 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH golang:1.22-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/2SharkyStudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/1.23/Dockerfile b/go/1.23/Dockerfile new file mode 100644 index 0000000..84c9338 --- /dev/null +++ b/go/1.23/Dockerfile @@ -0,0 +1,13 @@ +FROM --platform=$TARGETOS/$TARGETARCH golang:1.23-alpine + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apk add --update --no-cache ca-certificates tzdata \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/go/entrypoint.sh b/go/entrypoint.sh new file mode 100644 index 0000000..7f9cd09 --- /dev/null +++ b/go/entrypoint.sh @@ -0,0 +1,49 @@ +#!/bin/ash + +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +# 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 Go version +printf "\033[1m\033[33mcontainer~ \033[0mgo version\n" +go version + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" diff --git a/installers/alpine/Dockerfile b/installers/alpine/Dockerfile new file mode 100644 index 0000000..f5aee78 --- /dev/null +++ b/installers/alpine/Dockerfile @@ -0,0 +1,30 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH alpine:latest + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=AGPL + +RUN apk add --update --no-cache ca-certificates curl unzip tar git jq wget diff --git a/installers/debian/Dockerfile b/installers/debian/Dockerfile new file mode 100644 index 0000000..8ad926a --- /dev/null +++ b/installers/debian/Dockerfile @@ -0,0 +1,40 @@ +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=AGPL + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update && apt upgrade -y \ + && apt -y --no-install-recommends install ca-certificates curl git unzip zip tar jq wget + +# Only install the needed steamcmd packages on the AMD64 build +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + dpkg --add-architecture i386 && \ + apt update && \ + apt -y install lib32gcc-s1 libsdl2-2.0-0:i386; \ + fi \ No newline at end of file diff --git a/installers/ubuntu-amd64/Dockerfile b/installers/ubuntu-amd64/Dockerfile new file mode 100644 index 0000000..b0455c7 --- /dev/null +++ b/installers/ubuntu-amd64/Dockerfile @@ -0,0 +1,38 @@ +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:jammy + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=AGPL + +ENV DEBIAN_FRONTEND=noninteractive + +## Install dependencies +RUN apt-get update \ + && apt-get install -y \ + gcc sudo g++ libgcc1 libc++-dev gdb libc6 jq git wget curl tar zip unzip binutils \ + xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-openbsd telnet libatomic1 \ + libsdl1.2debian libsdl2-2.0-0 libfontconfig icu-devtools libunwind8 ca-certificates \ + sqlite3 libsqlite3-dev libzip4 locales ffmpeg apt-transport-https init-system-helpers \ + libcurl3-gnutls liblua5.1-0 libluajit-5.1-2 libsqlite3-0 bzip2 zlib1g libevent-dev \ + libmariadb-dev-compat libmariadb-dev libssl-dev libfluidsynth-dev libicu-dev libssl3 \ + libduktape207 libjsoncpp-dev libleveldb1d libncurses6 libncursesw6 tini \ + && rm -rf /var/lib/apt/lists/* + +# Install .NET SDK 9.x (dynamic version detection) +RUN wget -q https://dot.net/v1/dotnet-install.sh \ + && chmod +x dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '

SDK 9.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && ./dotnet-install.sh -i /usr/share -v "$D_V" \ + && ln -s /usr/share/dotnet /usr/bin/dotnet \ + && rm dotnet-install.sh + +# Install PowerShell +RUN mkdir -p /etc/apt/keyrings \ + && apt-get update \ + && apt-get install -y gnupg curl \ + && curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/repos/microsoft-ubuntu-jammy-prod jammy main" > /etc/apt/sources.list.d/microsoft-prod.list \ + && apt-get update \ + && apt-get install -y powershell \ + && rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/installers/ubuntu/Dockerfile b/installers/ubuntu/Dockerfile new file mode 100644 index 0000000..125baa6 --- /dev/null +++ b/installers/ubuntu/Dockerfile @@ -0,0 +1,34 @@ +# +# Copyright (c) 2022 oliver194 +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:latest + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +LABEL org.opencontainers.image.source="https://github.com/kylehost/yolks" +LABEL org.opencontainers.image.licenses=AGPL + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update \ + && apt upgrade -y \ + && apt -y --no-install-recommends install ca-certificates curl git unzip zip tar jq sudo diff --git a/java/11/Dockerfile b/java/11/Dockerfile new file mode 100644 index 0000000..1fc5f8c --- /dev/null +++ b/java/11/Dockerfile @@ -0,0 +1,38 @@ +FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:11-jdk-noble + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/11j9/Dockerfile b/java/11j9/Dockerfile new file mode 100644 index 0000000..5b07841 --- /dev/null +++ b/java/11j9/Dockerfile @@ -0,0 +1,36 @@ +FROM --platform=$TARGETOS/$TARGETARCH ibm-semeru-runtimes:open-11-jdk + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/16/Dockerfile b/java/16/Dockerfile new file mode 100644 index 0000000..d3d29cb --- /dev/null +++ b/java/16/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:16-jdk-focal + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/16j9/Dockerfile b/java/16j9/Dockerfile new file mode 100644 index 0000000..1329a22 --- /dev/null +++ b/java/16j9/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH ibm-semeru-runtimes:open-16-jdk + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] + diff --git a/java/17/Dockerfile b/java/17/Dockerfile new file mode 100644 index 0000000..e2fa6d0 --- /dev/null +++ b/java/17/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:17-jdk-noble + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=AGPL + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/19/Dockerfile b/java/19/Dockerfile new file mode 100644 index 0000000..2dc2099 --- /dev/null +++ b/java/19/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:19-jdk-focal + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/21/Dockerfile b/java/21/Dockerfile new file mode 100644 index 0000000..83bf881 --- /dev/null +++ b/java/21/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:21-jdk-noble + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/22/Dockerfile b/java/22/Dockerfile new file mode 100644 index 0000000..fd622e3 --- /dev/null +++ b/java/22/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:22-jdk-noble + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/25/Dockerfile b/java/25/Dockerfile new file mode 100644 index 0000000..59f9d5e --- /dev/null +++ b/java/25/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH openjdk:25 + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/27/Dockerfile b/java/27/Dockerfile new file mode 100644 index 0000000..ceb330e --- /dev/null +++ b/java/27/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH openjdk:27 + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/8/Dockerfile b/java/8/Dockerfile new file mode 100644 index 0000000..5d19d20 --- /dev/null +++ b/java/8/Dockerfile @@ -0,0 +1,37 @@ +FROM --platform=$TARGETOS/$TARGETARCH eclipse-temurin:8-jdk-noble + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/8j9/Dockerfile b/java/8j9/Dockerfile new file mode 100644 index 0000000..81f8fd8 --- /dev/null +++ b/java/8j9/Dockerfile @@ -0,0 +1,36 @@ +FROM --platform=$TARGETOS/$TARGETARCH ibm-semeru-runtimes:open-8-jdk + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" + +RUN apt update -y \ + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini \ + zip \ + unzip \ + jq + +## Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/java/entrypoint.sh b/java/entrypoint.sh new file mode 100644 index 0000000..710a57c --- /dev/null +++ b/java/entrypoint.sh @@ -0,0 +1,27 @@ +#!/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 Java version +printf "\033[1m\033[33mcontainer~ \033[0mjava -version\n" +java -version + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" diff --git a/mariadb/10.3/Dockerfile b/mariadb/10.3/Dockerfile new file mode 100644 index 0000000..c0c01d4 --- /dev/null +++ b/mariadb/10.3/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.3 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/10.4/Dockerfile b/mariadb/10.4/Dockerfile new file mode 100644 index 0000000..6f6ab6f --- /dev/null +++ b/mariadb/10.4/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.4 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/10.5/Dockerfile b/mariadb/10.5/Dockerfile new file mode 100644 index 0000000..31287fc --- /dev/null +++ b/mariadb/10.5/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.5 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/10.6/Dockerfile b/mariadb/10.6/Dockerfile new file mode 100644 index 0000000..76508de --- /dev/null +++ b/mariadb/10.6/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.6 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/10.7/Dockerfile b/mariadb/10.7/Dockerfile new file mode 100644 index 0000000..80688e2 --- /dev/null +++ b/mariadb/10.7/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.7 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/11.2/Dockerfile b/mariadb/11.2/Dockerfile new file mode 100644 index 0000000..77a436f --- /dev/null +++ b/mariadb/11.2/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.2 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/11.3/Dockerfile b/mariadb/11.3/Dockerfile new file mode 100644 index 0000000..ea4df75 --- /dev/null +++ b/mariadb/11.3/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.3 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/11.4/Dockerfile b/mariadb/11.4/Dockerfile new file mode 100644 index 0000000..22ad183 --- /dev/null +++ b/mariadb/11.4/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.4 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat-traditional \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/11.5/Dockerfile b/mariadb/11.5/Dockerfile new file mode 100644 index 0000000..f95efbc --- /dev/null +++ b/mariadb/11.5/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.5 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat-traditional \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/11.6/Dockerfile b/mariadb/11.6/Dockerfile new file mode 100644 index 0000000..5b49cd9 --- /dev/null +++ b/mariadb/11.6/Dockerfile @@ -0,0 +1,19 @@ +# ----------------------------------------------------- +# MariaDB Image for Pterodactyl +# ----------------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mariadb:11.6 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat-traditional \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mariadb/entrypoint.sh b/mariadb/entrypoint.sh new file mode 100644 index 0000000..7608153 --- /dev/null +++ b/mariadb/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/mongodb/6/Dockerfile b/mongodb/6/Dockerfile new file mode 100644 index 0000000..5b574c3 --- /dev/null +++ b/mongodb/6/Dockerfile @@ -0,0 +1,19 @@ +# ---------------------------------- +# Environment: MongoDB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mongo:6-jammy + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat iproute2 \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mongodb/7/Dockerfile b/mongodb/7/Dockerfile new file mode 100644 index 0000000..4ed3f3f --- /dev/null +++ b/mongodb/7/Dockerfile @@ -0,0 +1,19 @@ +# ---------------------------------- +# Environment: MongoDB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mongo:7-jammy + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat iproute2 \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mongodb/8/Dockerfile b/mongodb/8/Dockerfile new file mode 100644 index 0000000..f8f4464 --- /dev/null +++ b/mongodb/8/Dockerfile @@ -0,0 +1,19 @@ +# ---------------------------------- +# Environment: MongoDB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mongo:8-noble + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update -y \ + && apt install -y netcat-openbsd iproute2 \ + && useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/mongodb/entrypoint.sh b/mongodb/entrypoint.sh new file mode 100644 index 0000000..7608153 --- /dev/null +++ b/mongodb/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/mono/entrypoint.sh b/mono/entrypoint.sh new file mode 100644 index 0000000..fb782cf --- /dev/null +++ b/mono/entrypoint.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Wait for the container to fully initialize +sleep 1 + +# 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 + +if [ ! -z "${SRCDS_APPID}" ]; then + ## just in case someone removed the defaults. + if [ "${STEAM_USER}" == "" ]; then + echo -e "steam user is not set.\n" + echo -e "Using anonymous user.\n" + STEAM_USER=anonymous + STEAM_PASS="" + STEAM_AUTH="" + else + echo -e "user set to ${STEAM_USER}" + fi + + ## if auto_update is not set or to 1 update + if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + # Update Source Server + if [ ! -z ${SRCDS_APPID} ]; then + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + else + echo -e "No appid set. Starting Server" + fi + + else + echo -e "Not updating game server as auto update was set to 0. Starting Server" + fi +fi + + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/mono/latest/Dockerfile b/mono/latest/Dockerfile new file mode 100644 index 0000000..817adf1 --- /dev/null +++ b/mono/latest/Dockerfile @@ -0,0 +1,26 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2SharkyStudios/yolks:debian + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y upgrade +RUN apt install -y fontconfig dirmngr +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN sh -c 'echo "deb https://download.mono-project.com/repo/debian stable-buster main" > /etc/apt/sources.list.d/mono-official-stable.list' +RUN apt update +RUN apt install -y mono-complete + +# Only install the needed steamcmd packages on the AMD64 build +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + dpkg --add-architecture i386 && \ + apt update && \ + apt -y install lib32gcc-s1 libsdl2-2.0-0:i386; \ + fi + + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/nodejs/12/Dockerfile b/nodejs/12/Dockerfile new file mode 100644 index 0000000..8285282 --- /dev/null +++ b/nodejs/12/Dockerfile @@ -0,0 +1,39 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:12-bullseye-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@latest typescript ts-node @types/node + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/nodejs/14/Dockerfile b/nodejs/14/Dockerfile new file mode 100644 index 0000000..85c56fa --- /dev/null +++ b/nodejs/14/Dockerfile @@ -0,0 +1,39 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:14-bullseye-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@latest typescript ts-node @types/node + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/16/Dockerfile b/nodejs/16/Dockerfile new file mode 100644 index 0000000..059b492 --- /dev/null +++ b/nodejs/16/Dockerfile @@ -0,0 +1,39 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:16-bookworm-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@9.x.x typescript ts-node @types/node + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/17/Dockerfile b/nodejs/17/Dockerfile new file mode 100644 index 0000000..c4bf5e8 --- /dev/null +++ b/nodejs/17/Dockerfile @@ -0,0 +1,39 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:17-bullseye-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@8.x.x typescript ts-node @types/node + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/18/Dockerfile b/nodejs/18/Dockerfile new file mode 100644 index 0000000..eb4d298 --- /dev/null +++ b/nodejs/18/Dockerfile @@ -0,0 +1,44 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:18-bookworm-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@10.x.x typescript ts-node @types/node + +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/19/Dockerfile b/nodejs/19/Dockerfile new file mode 100644 index 0000000..20b6ef6 --- /dev/null +++ b/nodejs/19/Dockerfile @@ -0,0 +1,44 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:19-bullseye-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@9.x.x typescript ts-node @types/node + +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/20/Dockerfile b/nodejs/20/Dockerfile new file mode 100644 index 0000000..4eed726 --- /dev/null +++ b/nodejs/20/Dockerfile @@ -0,0 +1,44 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:20-bookworm-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@latest typescript ts-node @types/node + +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/nodejs/21/Dockerfile b/nodejs/21/Dockerfile new file mode 100644 index 0000000..284b471 --- /dev/null +++ b/nodejs/21/Dockerfile @@ -0,0 +1,45 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:21-bookworm-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + cmake \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@10.x.x typescript ts-node @types/node + +# install pnpm +RUN npm install -g corepack@latest +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/22/Dockerfile b/nodejs/22/Dockerfile new file mode 100644 index 0000000..68b6a9a --- /dev/null +++ b/nodejs/22/Dockerfile @@ -0,0 +1,44 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:22-bookworm-slim + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@latest typescript ts-node @types/node + +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/23/Dockerfile b/nodejs/23/Dockerfile new file mode 100644 index 0000000..4fe27f4 --- /dev/null +++ b/nodejs/23/Dockerfile @@ -0,0 +1,44 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:23-bookworm-slim + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@latest typescript ts-node @types/node + +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/24/Dockerfile b/nodejs/24/Dockerfile new file mode 100644 index 0000000..df83069 --- /dev/null +++ b/nodejs/24/Dockerfile @@ -0,0 +1,44 @@ +FROM --platform=$TARGETOS/$TARGETARCH node:24-bookworm-slim + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +# add container user and set stop signal +RUN useradd -m -d /home/container container +STOPSIGNAL SIGINT + +RUN apt update \ + && apt -y install \ + ffmpeg \ + iproute2 \ + git \ + sqlite3 \ + libsqlite3-dev \ + python3 \ + python3-dev \ + ca-certificates \ + dnsutils \ + tzdata \ + zip \ + tar \ + curl \ + build-essential \ + libtool \ + iputils-ping \ + libnss3 \ + tini + +RUN npm install --global npm@latest typescript ts-node @types/node + +# install pnpm +RUN npm install -g corepack +RUN corepack enable +RUN corepack prepare pnpm@latest --activate + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/nodejs/entrypoint.sh b/nodejs/entrypoint.sh new file mode 100644 index 0000000..b8161c8 --- /dev/null +++ b/nodejs/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Print Node.js Version +node -v + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/oses/alpine/Dockerfile b/oses/alpine/Dockerfile new file mode 100644 index 0000000..0049e1e --- /dev/null +++ b/oses/alpine/Dockerfile @@ -0,0 +1,20 @@ +FROM --platform=$TARGETOS/$TARGETARCH alpine:latest + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apk add --update --no-cache ca-certificates tzdata tini \ + && adduser -D -h /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/oses/alpine/entrypoint.sh b/oses/alpine/entrypoint.sh new file mode 100644 index 0000000..f6f2297 --- /dev/null +++ b/oses/alpine/entrypoint.sh @@ -0,0 +1,24 @@ +#!/bin/ash + +# 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 + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" + diff --git a/oses/debian/Dockerfile b/oses/debian/Dockerfile new file mode 100644 index 0000000..e63c432 --- /dev/null +++ b/oses/debian/Dockerfile @@ -0,0 +1,52 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +ENV DEBIAN_FRONTEND=noninteractive + +RUN useradd -m -d /home/container -s /bin/bash container + +RUN ln -s /home/container/ /nonexistent + +ENV USER=container HOME=/home/container + +## Update base packages +RUN apt update \ + && apt upgrade -y + +## Install dependencies +RUN apt install -y gcc g++ libgcc-12-dev libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-traditional telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig1 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev-compat libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ + liblua5.3-0 libz3-dev libzadc4 rapidjson-dev tzdata libevent-dev libzip4 libprotobuf32 libfluidsynth3 procps libstdc++6 tini + +# Temp fix for libicu66.1 for RAGE-MP and libssl1.1 for fivem and many more +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2.1_amd64.deb && \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + dpkg -i libicu66_66.1-2ubuntu2.1_amd64.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + rm libicu66_66.1-2ubuntu2.1_amd64.deb libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \ + fi +# ARM64 +RUN if [ ! "$(uname -m)" = "x86_64" ]; then \ + wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb && \ + dpkg -i libssl1.1_1.1.1f-1ubuntu2_arm64.deb && \ + rm libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ + fi + +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + + +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/oses/debian/entrypoint.sh b/oses/debian/entrypoint.sh new file mode 100644 index 0000000..9219410 --- /dev/null +++ b/oses/debian/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# 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} diff --git a/oses/ubuntu/Dockerfile b/oses/ubuntu/Dockerfile new file mode 100644 index 0000000..449ce83 --- /dev/null +++ b/oses/ubuntu/Dockerfile @@ -0,0 +1,39 @@ +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:24.04 + +LABEL author="Kyle Speight" maintainer="chillcog3142@proton.me" + +LABEL org.opencontainers.image.source="https://github.com/2sharkystudios/yolks" +LABEL org.opencontainers.image.licenses=MIT + +ENV DEBIAN_FRONTEND=noninteractive + +## Add container user +RUN useradd -m -d /home/container -s /bin/bash container +ENV USER=container HOME=/home/container + +## Update base packages +RUN apt update \ + && apt upgrade -y + +## Install dependencies +RUN apt install -y gcc sudo g++ libgcc1 libc++-dev gdb libc6 git gnupg wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-openbsd telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig icu-devtools libunwind8 sqlite3 libsqlite3-dev libzip4 locales ffmpeg apt-transport-https init-system-helpers \ + libcurl3-gnutls liblua5.1-0 libluajit-5.1-2 libsqlite3-0 bzip2 zlib1g libevent-dev libmariadb-dev-compat libmariadb-dev libssl-dev \ + libfluidsynth-dev libmariadb-dev libicu-dev libssl3 libduktape207 libjsoncpp-dev libleveldb1d libncurses6 libncursesw6 tini + + + + + +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/oses/ubuntu/entrypoint.sh b/oses/ubuntu/entrypoint.sh new file mode 100644 index 0000000..9219410 --- /dev/null +++ b/oses/ubuntu/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# 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} diff --git a/postgres/10/Dockerfile b/postgres/10/Dockerfile new file mode 100644 index 0000000..df4286f --- /dev/null +++ b/postgres/10/Dockerfile @@ -0,0 +1,22 @@ +# ---------------------------------- +# Environment: Postgres DB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:10-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata + +USER container +ENV HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/postgres/11/Dockerfile b/postgres/11/Dockerfile new file mode 100644 index 0000000..0824fe8 --- /dev/null +++ b/postgres/11/Dockerfile @@ -0,0 +1,22 @@ +# ---------------------------------- +# Environment: Postgres DB +# ----------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:11-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata + +USER container +ENV HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/postgres/12/Dockerfile b/postgres/12/Dockerfile new file mode 100644 index 0000000..aaa5fa0 --- /dev/null +++ b/postgres/12/Dockerfile @@ -0,0 +1,22 @@ +# ---------------------------------- +# Environment: Postgres DB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:12-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata + +USER container +ENV HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/postgres/13/Dockerfile b/postgres/13/Dockerfile new file mode 100644 index 0000000..d6ccba1 --- /dev/null +++ b/postgres/13/Dockerfile @@ -0,0 +1,22 @@ +# ---------------------------------- +# Environment: Postgres DB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:13-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata + +USER container +ENV HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/postgres/14/Dockerfile b/postgres/14/Dockerfile new file mode 100644 index 0000000..0347364 --- /dev/null +++ b/postgres/14/Dockerfile @@ -0,0 +1,22 @@ +# ---------------------------------- +# Environment: Postgres DB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:14-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata fontconfig git openssl sqlite tar tzdata + +USER container +ENV HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/postgres/16/Dockerfile b/postgres/16/Dockerfile new file mode 100644 index 0000000..518db19 --- /dev/null +++ b/postgres/16/Dockerfile @@ -0,0 +1,21 @@ +# ---------------------------------- +# Environment: Postgres DB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:16-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata +USER container +ENV HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/postgres/9/Dockerfile b/postgres/9/Dockerfile new file mode 100644 index 0000000..dfdb2aa --- /dev/null +++ b/postgres/9/Dockerfile @@ -0,0 +1,21 @@ +# ---------------------------------- +# Environment: Postgres DB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH postgres:9-alpine + +LABEL author="Parker" maintainer="parker@pterodactyl.io" + +# UID 999 is the default pterodactyl user +RUN adduser -D -h /home/container container + +RUN apk add --no-cache tini curl iproute2 ca-certificates fontconfig git openssl sqlite tar tzdata +USER container +ENV HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/postgres/entrypoint.sh b/postgres/entrypoint.sh new file mode 100644 index 0000000..0f568b1 --- /dev/null +++ b/postgres/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/ash +cd /home/container + +#output current postgres version +postgres --version + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/python/2.7/Dockerfile b/python/2.7/Dockerfile new file mode 100644 index 0000000..a1ed674 --- /dev/null +++ b/python/2.7/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:2.7-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/python/3.10/Dockerfile b/python/3.10/Dockerfile new file mode 100644 index 0000000..bef65bd --- /dev/null +++ b/python/3.10/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.10-slim-bookworm + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.11/Dockerfile b/python/3.11/Dockerfile new file mode 100644 index 0000000..f8b454f --- /dev/null +++ b/python/3.11/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim-bookworm + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.12/Dockerfile b/python/3.12/Dockerfile new file mode 100644 index 0000000..fad4f2f --- /dev/null +++ b/python/3.12/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim-bookworm + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.13/Dockerfile b/python/3.13/Dockerfile new file mode 100644 index 0000000..1985ec5 --- /dev/null +++ b/python/3.13/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.13-slim-bookworm + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.7/Dockerfile b/python/3.7/Dockerfile new file mode 100644 index 0000000..4a194e9 --- /dev/null +++ b/python/3.7/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.7-slim-bookworm + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.8/Dockerfile b/python/3.8/Dockerfile new file mode 100644 index 0000000..b67deb8 --- /dev/null +++ b/python/3.8/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.8-slim-bookworm + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.9/Dockerfile b/python/3.9/Dockerfile new file mode 100644 index 0000000..b8e2d3e --- /dev/null +++ b/python/3.9/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.9-slim-bookworm + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +RUN apt update \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/python/entrypoint.sh b/python/entrypoint.sh new file mode 100644 index 0000000..6cb029f --- /dev/null +++ b/python/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Print current Python version +python --version + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" diff --git a/redis/5/Dockerfile b/redis/5/Dockerfile new file mode 100644 index 0000000..af8ebd0 --- /dev/null +++ b/redis/5/Dockerfile @@ -0,0 +1,20 @@ +# ---------------------------------- +# Environment: redis +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH redis:5-bullseye + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt -y update && \ + apt -y upgrade && \ + apt -y install iproute2 && \ + useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/redis/6/Dockerfile b/redis/6/Dockerfile new file mode 100644 index 0000000..5ae67f1 --- /dev/null +++ b/redis/6/Dockerfile @@ -0,0 +1,20 @@ +# ---------------------------------- +# Environment: redis +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH redis:6-bookworm + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt -y update && \ + apt -y upgrade && \ + apt -y install iproute2 && \ + useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/redis/7/Dockerfile b/redis/7/Dockerfile new file mode 100644 index 0000000..de171af --- /dev/null +++ b/redis/7/Dockerfile @@ -0,0 +1,20 @@ +# ---------------------------------- +# Environment: redis +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH redis:7-bookworm + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt -y update && \ + apt -y upgrade && \ + apt -y install iproute2 && \ + useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/redis/8/Dockerfile b/redis/8/Dockerfile new file mode 100644 index 0000000..211024a --- /dev/null +++ b/redis/8/Dockerfile @@ -0,0 +1,18 @@ +# ---------------------------------- +# Environment: redis +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH redis:8-bookworm + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt -y update && \ + apt -y upgrade && \ + apt -y install iproute2 && \ + useradd -d /home/container -m container -s /bin/bash + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ../entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/redis/entrypoint.sh b/redis/entrypoint.sh new file mode 100644 index 0000000..25ea980 --- /dev/null +++ b/redis/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/rust/1.56/Dockerfile b/rust/1.56/Dockerfile new file mode 100644 index 0000000..f33d47e --- /dev/null +++ b/rust/1.56/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH rust:1.56-slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini pkg-config \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/rust/1.60/Dockerfile b/rust/1.60/Dockerfile new file mode 100644 index 0000000..d9a13b1 --- /dev/null +++ b/rust/1.60/Dockerfile @@ -0,0 +1,21 @@ +FROM --platform=$TARGETOS/$TARGETARCH rust:1.60-slim + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +LABEL org.opencontainers.image.source="https://github.com/kylehost/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini pkg-config \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/rust/entrypoint.sh b/rust/entrypoint.sh new file mode 100644 index 0000000..541d9e4 --- /dev/null +++ b/rust/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Print current Rust version +cargo --version + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')) +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/rust/latest/Dockerfile b/rust/latest/Dockerfile new file mode 100644 index 0000000..51d5ad9 --- /dev/null +++ b/rust/latest/Dockerfile @@ -0,0 +1,15 @@ +FROM --platform=$TARGETOS/$TARGETARCH rust:slim + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" +RUN apt update \ + && apt -y install git dnsutils curl iproute2 ffmpeg tini pkg-config \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container CARGO_HOME=/home/container/.cargo +WORKDIR /home/container + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/shareforge/1.41.4/Dockerfile b/shareforge/1.41.4/Dockerfile new file mode 100644 index 0000000..bc6f60d --- /dev/null +++ b/shareforge/1.41.4/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim-bookworm + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +RUN apt update \ + && apt -y install git gcc php python3 python3-pip g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ + && useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/shareforge/entrypoint.sh b/shareforge/entrypoint.sh new file mode 100644 index 0000000..6cb029f --- /dev/null +++ b/shareforge/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Print current Python version +python --version + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" diff --git a/steamcmd/debian/Dockerfile b/steamcmd/debian/Dockerfile new file mode 100644 index 0000000..7ff6dbe --- /dev/null +++ b/steamcmd/debian/Dockerfile @@ -0,0 +1,77 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:latest + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +LABEL org.opencontainers.image.source="https://github.com/kylehost/yolks" +LABEL org.opencontainers.image.licenses=MIT + +ENV DEBIAN_FRONTEND=noninteractive + +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y \ + curl \ + g++ \ + gcc \ + gdb \ + iproute2 \ + locales \ + net-tools \ + netcat-traditional \ + tar \ + telnet \ + tini \ + tzdata \ + wget \ + xvfb \ + lib32gcc-s1 \ + lib32stdc++6 \ + lib32tinfo6 \ + lib32z1 \ + libcurl3-gnutls:i386 \ + libcurl4-gnutls-dev:i386 \ + libcurl4:i386 \ + libfontconfig1 \ + libgcc-11-dev \ + libgcc-12-dev \ + libncurses5:i386 \ + libsdl1.2debian \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 \ + libssl-dev:i386 \ + libtinfo6:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + + +# Temp fix for things that still need libssl1.1 +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \ + rm libssl1.1_1.1.0g-2ubuntu4_amd64.deb; \ + fi + +# Set the locale +RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ + locale-gen +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 + +# Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/steamcmd/dotnet/Dockerfile b/steamcmd/dotnet/Dockerfile new file mode 100644 index 0000000..0450546 --- /dev/null +++ b/steamcmd/dotnet/Dockerfile @@ -0,0 +1,38 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl-dev:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat-traditional tzdata \ + && apt install -y libstdc++6 libstdc++6:i386 libc6-amd64 libc6:i386 psmisc libgdiplus libcurl4 libfontconfig1 libpangocairo-1.0-0 libnss3 libgconf-2-4 libxi6 libxcursor1 libxss1 libxcomposite1 libasound2 libxdamage1 libxtst6 libatk1.0-0 libxrandr2 libcurl4 xvfb mesa-utils git \ + && apt install -y python3 python3-dev python3-pip apt-transport-https wget iproute2 sqlite3 xvfb tini \ + && useradd -d /home/container -m container + +RUN apt update -y \ + && apt upgrade -y \ + && wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ + && dpkg -i packages-microsoft-prod.deb \ + && rm packages-microsoft-prod.deb \ + && apt update -y \ + && apt install -y aspnetcore-runtime-7.0 dotnet-sdk-7.0 libgdiplus aspnetcore-runtime-8.0 dotnet-sdk-8.0 aspnetcore-runtime-9.0 dotnet-sdk-9.0 + +## install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/steamcmd/entrypoint.sh b/steamcmd/entrypoint.sh new file mode 100644 index 0000000..f3f6659 --- /dev/null +++ b/steamcmd/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash + +# +# Copyright (c) 2021 Matthew Penner +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +# Wait for the container to fully initialize +sleep 1 + +# 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 + +# Set environment for Steam Proton +if [ -f "/usr/local/bin/proton" ]; then + if [ ! -z ${SRCDS_APPID} ]; then + mkdir -p /home/container/.steam/steam/steamapps/compatdata/${SRCDS_APPID} + export STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/container/.steam/steam" + export STEAM_COMPAT_DATA_PATH="/home/container/.steam/steam/steamapps/compatdata/${SRCDS_APPID}" + # Fix for pipx with protontricks + export PATH=$PATH:/root/.local/bin + else + echo -e "----------------------------------------------------------------------------------" + echo -e "WARNING!!! Proton needs variable SRCDS_APPID, else it will not work. Please add it" + echo -e "Server stops now" + echo -e "----------------------------------------------------------------------------------" + exit 0 + fi +fi + +# Switch to the container's working directory +cd /home/container || exit 1 + +## just in case someone removed the defaults. +if [ "${STEAM_USER}" == "" ]; then + echo -e "steam user is not set.\n" + echo -e "Using anonymous user.\n" + STEAM_USER=anonymous + STEAM_PASS="" + STEAM_AUTH="" +else + echo -e "user set to ${STEAM_USER}" +fi + +## if auto_update is not set or to 1 update +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + # Update Source Server + if [ ! -z ${SRCDS_APPID} ]; then + if [ "${STEAM_USER}" == "anonymous" ]; then + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && printf %s 'validate' ) +quit + else + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) ${INSTALL_FLAGS} $( [[ "${VALIDATE}" == "1" ]] && printf %s 'validate' ) +quit + fi + else + echo -e "No appid set. Starting Server" + fi + +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/steamcmd/proton/Dockerfile b/steamcmd/proton/Dockerfile new file mode 100644 index 0000000..81c1e27 --- /dev/null +++ b/steamcmd/proton/Dockerfile @@ -0,0 +1,79 @@ +# --------------------------------------------- +# Steam Proton image +# --------------------------------------------- +FROM debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +# Install required packages +RUN dpkg --add-architecture i386 +RUN apt update +RUN apt install -y --no-install-recommends \ + wget \ + iproute2 \ + gnupg2 \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + libncurses5-dev:i386 \ + libncurses6 \ + dbus \ + libgdiplus \ + lib32gcc-s1 +RUN apt install -y \ + alsa-tools \ + libpulse0 \ + pulseaudio \ + libpulse-dev \ + libasound2 \ + libao-common \ + gnutls-bin \ + gnupg \ + locales \ + cabextract \ + curl \ + python3 \ + python3-pip \ + python3-setuptools \ + tini \ + file \ + pipx + +# Download Proton GE +RUN curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | egrep .tar.gz)" +RUN tar -xzf GE-Proton*.tar.gz -C /usr/local/bin/ --strip-components=1 +RUN rm GE-Proton*.* + +# Proton Fix machine-id +RUN rm -f /etc/machine-id +RUN dbus-uuidgen --ensure=/etc/machine-id +RUN rm /var/lib/dbus/machine-id +RUN dbus-uuidgen --ensure + +# Setup Protontricks +RUN pipx install protontricks + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/steamcmd/proton_8/Dockerfile b/steamcmd/proton_8/Dockerfile new file mode 100644 index 0000000..610437d --- /dev/null +++ b/steamcmd/proton_8/Dockerfile @@ -0,0 +1,79 @@ +# --------------------------------------------- +# Steam Proton image +# --------------------------------------------- +FROM debian:bookworm-slim + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" + +## install required packages +RUN dpkg --add-architecture i386 +RUN apt update +RUN apt install -y --no-install-recommends \ + wget \ + iproute2 \ + gnupg2 \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + libncurses5-dev:i386 \ + libncurses6 \ + dbus \ + libgdiplus \ + lib32gcc-s1 +RUN apt install -y \ + alsa-tools \ + libpulse0 \ + pulseaudio \ + libpulse-dev \ + libasound2 \ + libao-common \ + gnutls-bin \ + gnupg \ + locales \ + cabextract \ + curl \ + python3 \ + python3-pip \ + python3-setuptools \ + tini \ + file \ + pipx + +# Download Proton GE +RUN curl -sLOJ "$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/tags/GE-Proton8-32 | grep browser_download_url | cut -d\" -f4 | egrep .tar.gz)" +RUN tar -xzf GE-Proton*.tar.gz -C /usr/local/bin/ --strip-components=1 +RUN rm GE-Proton*.* + +# Proton Fix machine-id +RUN rm -f /etc/machine-id +RUN dbus-uuidgen --ensure=/etc/machine-id +RUN rm /var/lib/dbus/machine-id +RUN dbus-uuidgen --ensure + +# Setup Protontricks +RUN pipx install protontricks + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/steamcmd/sniper/Dockerfile b/steamcmd/sniper/Dockerfile new file mode 100644 index 0000000..383f8a9 --- /dev/null +++ b/steamcmd/sniper/Dockerfile @@ -0,0 +1,60 @@ +# --------------------------------------------- +# Steam Sniper image (RT3) +# --------------------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH registry.gitlab.steamos.cloud/steamrt/sniper/platform:latest-container-runtime-depot + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" +LABEL org.opencontainers.image.description SteamRT3 Platform image for Pterodactyl Source engine servers. + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update \ + && apt upgrade -y \ + && apt install -y \ + tar \ + curl \ + gcc \ + g++ \ + lib32gcc-s1 \ + libgcc1 \ + libcurl4-gnutls-dev:i386 \ + libssl1.1:i386 \ + libcurl4:i386 \ + lib32tinfo6 \ + libtinfo6:i386 \ + lib32z1 \ + lib32stdc++6 \ + libncurses5:i386 \ + libcurl3-gnutls:i386 \ + libsdl2-2.0-0:i386 \ + libsdl2-2.0-0 \ + iproute2 \ + gdb \ + libsdl1.2debian \ + libfontconfig1 \ + telnet \ + net-tools \ + netcat \ + tzdata \ + xvfb \ + tini \ + libc6 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Setup user and working directory +RUN useradd -m -d /home/container -s /bin/bash container +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/steamcmd/ubuntu/Dockerfile b/steamcmd/ubuntu/Dockerfile new file mode 100644 index 0000000..cb486f4 --- /dev/null +++ b/steamcmd/ubuntu/Dockerfile @@ -0,0 +1,36 @@ +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:24.04 + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/kylehost/yolks" +LABEL org.opencontainers.image.licenses=AGPL-3.0-or-later + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y tar curl gcc g++ lib32gcc-s1 libcurl4-gnutls-dev:i386 libssl-dev:i386 libssl-dev libcurl4t64:i386 libcurl4-gnutls:i386 lib32stdc++6 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian telnet net-tools netcat netcat-openbsd tzdata libtinfo6:i386 libncurses6:i386 faketime:i386 lib32tinfo6 lib32z1 libtbb12 libtinfo6 libstdc++6 readline-common libncursesw6 libfontconfig1 libnss-wrapper gettext-base libc6-i386 libcurl4t64 libssl3t64 libssl3t64:i386 libc6 libc6:i386 xvfb libc++-dev tini + +RUN useradd -d /home/container -m container + +## Specific to pavlov_vr +RUN rm /usr/lib/x86_64-linux-gnu/libc++.so \ + && ln -s /usr/lib/x86_64-linux-gnu/libc++.so.1 /usr/lib/x86_64-linux-gnu/libc++.so + +## install rcon (amd64 only; adjust for multi-arch if needed) +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ \ + && rm -rf rcon.tar.gz rcon-0.10.3-amd64_linux + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/tarkov/entrypoint.sh b/tarkov/entrypoint.sh new file mode 100644 index 0000000..cdcd8ce --- /dev/null +++ b/tarkov/entrypoint.sh @@ -0,0 +1,21 @@ +#!/bin/bash +cd /home/container + +# Set environment variable that holds the Internal Docker IP +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# set this variable, dotnet needs it even without it it reports to `dotnet --info` it can not start any aplication without this +export DOTNET_ROOT=/usr/share/ + +# print the dotnet version on startup +printf "\033[1m\033[33mcontainer~ \033[0mdotnet --version\n" +dotnet --version + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +echo "Welcome to SPT egg by chillcog3142@proton.me" +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/tarkov/v4.0.11/Dockerfile b/tarkov/v4.0.11/Dockerfile new file mode 100644 index 0000000..75c6486 --- /dev/null +++ b/tarkov/v4.0.11/Dockerfile @@ -0,0 +1,38 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/2sharkystudios/base:ubuntu + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +ENV DEBIAN_FRONTEND=noninteractive + +# Install base dependencies +RUN apt-get update \ + && apt-get install -y ca-certificates gnupg lsb-release wget curl iproute2 libgdiplus tini \ + && rm -rf /var/lib/apt/lists/* + +# Install .NET SDK 9.x (dynamic version detection) +RUN wget -q https://dot.net/v1/dotnet-install.sh \ + && chmod +x dotnet-install.sh \ + && D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '

SDK 9.*.*

' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \ + && ./dotnet-install.sh -i /usr/share -v "$D_V" \ + && ln -s /usr/share/dotnet /usr/bin/dotnet \ + && rm dotnet-install.sh + +# Install PowerShell +RUN mkdir -p /etc/apt/keyrings \ + && curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/keyrings/microsoft-prod.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/repos/microsoft-ubuntu-jammy-prod jammy main" > /etc/apt/sources.list.d/microsoft-prod.list \ + && apt-get update \ + && apt-get install -y powershell \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /home/container/ + +USER container +ENV USER=container HOME=/home/container + +RUN chmod +x /entrypoint.sh + +STOPSIGNAL SIGINT + +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/voice/mumble/Dockerfile b/voice/mumble/Dockerfile new file mode 100644 index 0000000..aa82e8a --- /dev/null +++ b/voice/mumble/Dockerfile @@ -0,0 +1,22 @@ +FROM --platform=$TARGETOS/$TARGETARCH ghcr.io/mumble-voip/mumble-server:latest + +# Install runtime dependencies +RUN apt update \ + && apt -y install iproute2 tini \ + && useradd -m -d /home/container container + +# Set up user and working directory +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +# Set the stop signal +STOPSIGNAL SIGINT + +# Copy and set up the entrypoint script +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +# Define entrypoint and command +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/voice/mumble/entrypoint.sh b/voice/mumble/entrypoint.sh new file mode 100644 index 0000000..6b67977 --- /dev/null +++ b/voice/mumble/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Print the Muble server version +/usr/bin/mumble-server --version + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e $(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 diff --git a/voice/teaspeak/Dockerfile b/voice/teaspeak/Dockerfile new file mode 100644 index 0000000..b8ce564 --- /dev/null +++ b/voice/teaspeak/Dockerfile @@ -0,0 +1,34 @@ +FROM --platform=$TARGETOS/$TARGETARCH debian:latest + +LABEL author="Kyle Speight" maintainer="postmaster@terraforge.fun" + +LABEL org.opencontainers.image.source="https://github.com/kylehost/yolks" +LABEL org.opencontainers.image.licenses=MIT + +ENV DEBIAN_FRONTEND=noninteractive + +## update base packages +RUN apt update \ + && apt upgrade -y + +## install dependencies +RUN apt install -y ffmpeg curl python3 iproute2 libjemalloc2 tini + +# Install latest youtube-dl +RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/youtube-dl +RUN chmod a+rx /usr/local/bin/youtube-dl + +RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1000 + +RUN useradd -m -d /home/container container + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/voice/teaspeak/entrypoint.sh b/voice/teaspeak/entrypoint.sh new file mode 100644 index 0000000..5f774fa --- /dev/null +++ b/voice/teaspeak/entrypoint.sh @@ -0,0 +1,24 @@ +# 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 + +echo "installed youtube-dl Version:" +/usr/local/bin/youtube-dl --version + +# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell +# variable format of "${VARIABLE}" before evaluating the string and automatically +# replacing the values. +PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g') + +# Display the command we're running in the output, and then execute it with eval +printf "\033[1m\033[33mcontainer~ \033[0m" +echo "$PARSED" +# shellcheck disable=SC2086 +eval "$PARSED" diff --git a/wine/10/Dockerfile b/wine/10/Dockerfile new file mode 100644 index 0000000..3dd3fe7 --- /dev/null +++ b/wine/10/Dockerfile @@ -0,0 +1,59 @@ +# --------------------------------------- +# Generic Wine image based on Wine staging +# --------------------------------------- +FROM ghcr.io/2sharkystudios/base:debian + +LABEL author="Kyle Speight" maintainer="kyle@kyle-hosting.xyz" +LABEL org.opencontainers.image.licenses=MIT + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends \ + gnupg2 \ + tzdata \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + python3 \ + libncurses5:i386 \ + libncurses6:i386 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Install wine and with recommends +RUN mkdir -pm755 /etc/apt/keyrings +RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources +RUN apt update +RUN apt install --install-recommends wine-stable-i386=10.0.0.0~bookworm-1 -y && \ + apt install --install-recommends wine-stable-amd64=10.0.0.0~bookworm-1 -y && \ + apt install --install-recommends wine-stable=10.0.0.0~bookworm-1 -y && \ + apt install --install-recommends winehq-stable=10.0.0.0~bookworm-1 -y && \ + apt install --install-recommends cabextract wine-binfmt -y + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +ENV HOME=/home/container +ENV WINEPREFIX=/home/container/.wine +ENV WINEDEBUG=-all +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +ENV DISPLAY=:0 +ENV DISPLAY_WIDTH=1024 +ENV DISPLAY_HEIGHT=768 +ENV DISPLAY_DEPTH=16 +ENV AUTO_UPDATE=1 +ENV XVFB=1 + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/wine/7/Dockerfile b/wine/7/Dockerfile new file mode 100644 index 0000000..bb40a27 --- /dev/null +++ b/wine/7/Dockerfile @@ -0,0 +1,59 @@ +# --------------------------------------- +# Generic Wine image based on Wine stable +# --------------------------------------- +FROM ghcr.io/2sharkystudios/base:debian + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL org.opencontainers.image.licenses=MIT + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends \ + gnupg2 \ + tzdata \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + python3 \ + libncurses5:i386 \ + libncurses6:i386 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Install wine and with recommends +RUN mkdir -pm755 /etc/apt/keyrings +RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources +RUN apt update +RUN apt install --install-recommends wine-stable-i386=7.0.2~bookworm-1 -y && \ + apt install --install-recommends wine-stable-amd64=7.0.2~bookworm-1 -y && \ + apt install --install-recommends wine-stable=7.0.2~bookworm-1 -y && \ + apt install --install-recommends winehq-stable=7.0.2~bookworm-1 -y && \ + apt install --install-recommends cabextract wine-binfmt -y + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +ENV HOME=/home/container +ENV WINEPREFIX=/home/container/.wine +ENV WINEDEBUG=-all +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +ENV DISPLAY=:0 +ENV DISPLAY_WIDTH=1024 +ENV DISPLAY_HEIGHT=768 +ENV DISPLAY_DEPTH=16 +ENV AUTO_UPDATE=1 +ENV XVFB=1 + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/wine/8/Dockerfile b/wine/8/Dockerfile new file mode 100644 index 0000000..3570916 --- /dev/null +++ b/wine/8/Dockerfile @@ -0,0 +1,59 @@ +# --------------------------------------- +# Generic Wine image based on Wine staging +# --------------------------------------- +FROM ghcr.io/2sharkystudios/base:debian + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL org.opencontainers.image.licenses=MIT + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends \ + gnupg2 \ + tzdata \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + python3 \ + libncurses5:i386 \ + libncurses6:i386 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Install wine and with recommends +RUN mkdir -pm755 /etc/apt/keyrings +RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources +RUN apt update +RUN apt install --install-recommends wine-stable-i386=8.0.2~bookworm-1 -y && \ + apt install --install-recommends wine-stable-amd64=8.0.2~bookworm-1 -y && \ + apt install --install-recommends wine-stable=8.0.2~bookworm-1 -y && \ + apt install --install-recommends winehq-stable=8.0.2~bookworm-1 -y && \ + apt install --install-recommends cabextract wine-binfmt -y + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +ENV HOME=/home/container +ENV WINEPREFIX=/home/container/.wine +ENV WINEDEBUG=-all +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +ENV DISPLAY=:0 +ENV DISPLAY_WIDTH=1024 +ENV DISPLAY_HEIGHT=768 +ENV DISPLAY_DEPTH=16 +ENV AUTO_UPDATE=1 +ENV XVFB=1 + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/wine/9/Dockerfile b/wine/9/Dockerfile new file mode 100644 index 0000000..98e7138 --- /dev/null +++ b/wine/9/Dockerfile @@ -0,0 +1,59 @@ +# --------------------------------------- +# Generic Wine image based on Wine staging +# --------------------------------------- +FROM ghcr.io/2sharkystudios/base:debian + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL org.opencontainers.image.licenses=MIT + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends \ + gnupg2 \ + tzdata \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + python3 \ + libncurses5:i386 \ + libncurses6:i386 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Install wine and with recommends +RUN mkdir -pm755 /etc/apt/keyrings +RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources +RUN apt update +RUN apt install --install-recommends wine-stable-i386=9.0.0.0~bookworm-1 -y && \ + apt install --install-recommends wine-stable-amd64=9.0.0.0~bookworm-1 -y && \ + apt install --install-recommends wine-stable=9.0.0.0~bookworm-1 -y && \ + apt install --install-recommends winehq-stable=9.0.0.0~bookworm-1 -y && \ + apt install --install-recommends cabextract wine-binfmt -y + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +ENV HOME=/home/container +ENV WINEPREFIX=/home/container/.wine +ENV WINEDEBUG=-all +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +ENV DISPLAY=:0 +ENV DISPLAY_WIDTH=1024 +ENV DISPLAY_HEIGHT=768 +ENV DISPLAY_DEPTH=16 +ENV AUTO_UPDATE=1 +ENV XVFB=1 + +COPY ../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/wine/devel/Dockerfile b/wine/devel/Dockerfile new file mode 100644 index 0000000..10e6acd --- /dev/null +++ b/wine/devel/Dockerfile @@ -0,0 +1,55 @@ +# --------------------------------------- +# Generic Wine image based on Wine devel +# --------------------------------------- +FROM ghcr.io/2sharkystudios/base:debian + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL org.opencontainers.image.licenses=MIT + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends \ + gnupg2 \ + tzdata \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + python3 \ + libncurses5:i386 \ + libncurses6:i386 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Install wine and with recommends +RUN mkdir -pm755 /etc/apt/keyrings +RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources +RUN apt update +RUN apt install --install-recommends winehq-devel cabextract wine-binfmt -y + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +ENV HOME=/home/container +ENV WINEPREFIX=/home/container/.wine +ENV WINEDEBUG=-all +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +ENV DISPLAY=:0 +ENV DISPLAY_WIDTH=1024 +ENV DISPLAY_HEIGHT=768 +ENV DISPLAY_DEPTH=16 +ENV AUTO_UPDATE=1 +ENV XVFB=1 + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/wine/entrypoint.sh b/wine/entrypoint.sh new file mode 100644 index 0000000..bef08de --- /dev/null +++ b/wine/entrypoint.sh @@ -0,0 +1,86 @@ +#!/bin/bash +cd /home/container + +# Information output +echo "Running on Debian $(cat /etc/debian_version)" +echo "Current timezone: $(cat /etc/timezone)" +wine --version + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +## just in case someone removed the defaults. +if [ "${STEAM_USER}" == "" ]; then + echo -e "steam user is not set.\n" + echo -e "Using anonymous user.\n" + STEAM_USER=anonymous + STEAM_PASS="" + STEAM_AUTH="" +else + echo -e "user set to ${STEAM_USER}" +fi + +## if auto_update is not set or to 1 update +if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then + # Update Source Server + if [ ! -z ${SRCDS_APPID} ]; then + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit + else + echo -e "No appid set. Starting Server" + fi + +else + echo -e "Not updating game server as auto update was set to 0. Starting Server" +fi + +if [[ $XVFB == 1 ]]; then + Xvfb :0 -screen 0 ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}x${DISPLAY_DEPTH} & +fi + +# Install necessary to run packages +echo "First launch will throw some errors. Ignore them" + +mkdir -p $WINEPREFIX + +# Check if wine-gecko required and install it if so +if [[ $WINETRICKS_RUN =~ gecko ]]; then + echo "Installing Gecko" + WINETRICKS_RUN=${WINETRICKS_RUN/gecko} + + if [ ! -f "$WINEPREFIX/gecko_x86.msi" ]; then + wget -q -O $WINEPREFIX/gecko_x86.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86.msi + fi + + if [ ! -f "$WINEPREFIX/gecko_x86_64.msi" ]; then + wget -q -O $WINEPREFIX/gecko_x86_64.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86_64.msi + fi + + wine msiexec /i $WINEPREFIX/gecko_x86.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_install.log + wine msiexec /i $WINEPREFIX/gecko_x86_64.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_64_install.log +fi + +# Check if wine-mono required and install it if so +if [[ $WINETRICKS_RUN =~ mono ]]; then + echo "Installing mono" + WINETRICKS_RUN=${WINETRICKS_RUN/mono} + + if [ ! -f "$WINEPREFIX/mono.msi" ]; then + wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/9.1.0/wine-mono-9.1.0-x86.msi + fi + + wine msiexec /i $WINEPREFIX/mono.msi /qn /quiet /norestart /log $WINEPREFIX/mono_install.log +fi + +# List and install other packages +for trick in $WINETRICKS_RUN; do + echo "Installing $trick" + winetricks -q $trick +done + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/wine/latest/Dockerfile b/wine/latest/Dockerfile new file mode 100644 index 0000000..c8c08dc --- /dev/null +++ b/wine/latest/Dockerfile @@ -0,0 +1,55 @@ +# --------------------------------------- +# Generic Wine image based on Wine stable +# --------------------------------------- +FROM ghcr.io/2sharkystudios/base:debian + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL org.opencontainers.image.licenses=MIT + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends \ + gnupg2 \ + tzdata \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + python3 \ + libncurses5:i386 \ + libncurses6:i386 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Install wine and with recommends +RUN mkdir -pm755 /etc/apt/keyrings +RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources +RUN apt update +RUN apt install --install-recommends winehq-stable cabextract wine-binfmt -y + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +ENV HOME=/home/container +ENV WINEPREFIX=/home/container/.wine +ENV WINEDEBUG=-all +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +ENV DISPLAY=:0 +ENV DISPLAY_WIDTH=1024 +ENV DISPLAY_HEIGHT=768 +ENV DISPLAY_DEPTH=16 +ENV AUTO_UPDATE=1 +ENV XVFB=1 + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/wine/staging/Dockerfile b/wine/staging/Dockerfile new file mode 100644 index 0000000..bfa139b --- /dev/null +++ b/wine/staging/Dockerfile @@ -0,0 +1,55 @@ +# --------------------------------------- +# Generic Wine image based on Wine staging +# --------------------------------------- +FROM ghcr.io/2sharkystudios/base:debian + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL org.opencontainers.image.licenses=MIT + +# Install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends \ + gnupg2 \ + tzdata \ + software-properties-common \ + libntlm0 \ + winbind \ + xvfb \ + xauth \ + python3 \ + libncurses5:i386 \ + libncurses6:i386 \ + libsdl2-2.0-0 \ + libsdl2-2.0-0:i386 + +# Install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.3-amd64_linux/rcon /usr/local/bin/ + +# Install wine and with recommends +RUN mkdir -pm755 /etc/apt/keyrings +RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key +RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources +RUN apt update +RUN apt install --install-recommends winehq-staging cabextract wine-binfmt -y + +# Set up Winetricks +RUN wget -q -O /usr/sbin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks \ + && chmod +x /usr/sbin/winetricks + +ENV HOME=/home/container +ENV WINEPREFIX=/home/container/.wine +ENV WINEDEBUG=-all +ENV WINEDLLOVERRIDES="mscoree,mshtml=" +ENV DISPLAY=:0 +ENV DISPLAY_WIDTH=1024 +ENV DISPLAY_HEIGHT=768 +ENV DISPLAY_DEPTH=16 +ENV AUTO_UPDATE=1 +ENV XVFB=1 + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/yolk.png b/yolk.png new file mode 100644 index 0000000..ebf2832 Binary files /dev/null and b/yolk.png differ