diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..3698a72 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +### 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? +* [ ] Have you added an explanation of what your changes do and why you'd like us to include them? + +### New Image Submissions: + +1. [ ] Have you added your image to the [Github workflows](https://github.com/parkervcp/yolks/tree/master/.github/workflows)? +2. [ ] Have you updated the README list to contain your new image? \ No newline at end of file diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 603be73..98f8534 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -1,5 +1,6 @@ name: build oses on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml index 5dc539c..6eae438 100644 --- a/.github/workflows/bot.yml +++ b/.github/workflows/bot.yml @@ -1,5 +1,6 @@ name: build bot on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: @@ -8,14 +9,13 @@ on: paths: - bot/** jobs: - push: + pushArm: name: "yolks:bot_${{ matrix.tag }}" runs-on: ubuntu-latest strategy: fail-fast: false matrix: tag: - - bastion - parkertron - red - sinusbot @@ -23,7 +23,52 @@ jobs: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 with: - version: "v0.5.1" + version: "v0.7.0" + buildkitd-flags: --debug + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: arm64,amd64 + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + - uses: docker/build-push-action@v2 + 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/parkervcp/yolks:bot_${{ 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: diff --git a/.github/workflows/cassandra.yml b/.github/workflows/cassandra.yml index 1d61259..69ecb78 100644 --- a/.github/workflows/cassandra.yml +++ b/.github/workflows/cassandra.yml @@ -1,5 +1,6 @@ name: build cassandra on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 8def61e..d7859d2 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,7 +1,6 @@ name: build dotnet on: - # Allows you to run this workflow manually from the Actions tab - # workflow_dispatch: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: @@ -19,7 +18,8 @@ jobs: tag: - 2.1 - 3.1 - - 5.0 + - 5 + - 6 steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index c67aea0..6cd1412 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -1,5 +1,6 @@ name: build erlang on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 6d95474..4ca3a3a 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -1,5 +1,6 @@ name: build games on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: @@ -16,7 +17,6 @@ jobs: matrix: game: - arma3 - - fivem - source steps: - uses: actions/checkout@v2 @@ -36,4 +36,4 @@ jobs: platforms: linux/amd64 push: true tags: | - ghcr.io/parkervcp/games:${{ matrix.game }} \ No newline at end of file + ghcr.io/parkervcp/games:${{ matrix.game }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1b39e18..66e9744 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,5 +1,6 @@ name: build go on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: @@ -36,4 +37,4 @@ jobs: platforms: linux/amd64 push: true tags: | - ghcr.io/parkervcp/yolks:go_${{ matrix.tag }} \ No newline at end of file + ghcr.io/parkervcp/yolks:go_${{ matrix.tag }} diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index ad09ccf..81eff14 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -1,5 +1,6 @@ name: build installers on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: @@ -35,4 +36,4 @@ jobs: platforms: linux/amd64 push: true tags: | - ghcr.io/parkervcp/installers:${{ matrix.tag }} \ No newline at end of file + ghcr.io/parkervcp/installers:${{ matrix.tag }} diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index ff9362c..80008b7 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -1,5 +1,6 @@ name: build java on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: @@ -16,11 +17,12 @@ jobs: matrix: tag: - 8 - - 8j9 +# - 8j9 - 11 - - 11j9 +# - 11j9 - 16 - - 16j9 +# - 16j9 + - 17 steps: - uses: actions/checkout@v2 - uses: docker/setup-qemu-action@v1 @@ -40,4 +42,4 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - ghcr.io/parkervcp/yolks:java_${{ matrix.tag }} \ No newline at end of file + ghcr.io/parkervcp/yolks:java_${{ matrix.tag }} diff --git a/.github/workflows/mono.yml b/.github/workflows/mono.yml new file mode 100644 index 0000000..749e28c --- /dev/null +++ b/.github/workflows/mono.yml @@ -0,0 +1,38 @@ +name: build mono +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - mono/** +jobs: + push: + name: "yolks:mono_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - latest + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-buildx-action@v1 + with: + version: "v0.5.1" + buildkitd-flags: --debug + - uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + - uses: docker/build-push-action@v2 + with: + context: ./mono + file: ./mono/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/parkervcp/yolks:mono_${{ matrix.tag }} diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 9beb749..179c8b5 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,12 +1,13 @@ name: build nodejs on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: branches: - master paths: - - nodejs/* + - nodejs/** jobs: push: name: "yolks:nodejs_${{ matrix.tag }}" @@ -17,10 +18,12 @@ jobs: tag: - 12 - 14 - - 15 - 16 + - 17 steps: - uses: actions/checkout@v2 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v1 - uses: docker/setup-buildx-action@v1 with: version: "v0.5.1" @@ -34,7 +37,7 @@ jobs: with: context: ./nodejs file: ./nodejs/${{ matrix.tag }}/Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: | - ghcr.io/parkervcp/yolks:nodejs_${{ matrix.tag }} \ No newline at end of file + ghcr.io/parkervcp/yolks:nodejs_${{ matrix.tag }} diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 4eea5a7..96892de 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,5 +1,6 @@ name: build python on: + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: @@ -15,12 +16,15 @@ jobs: fail-fast: false matrix: tag: - - 2.7 - - 3.7 - - 3.8 - - 3.9 + - '2.7' + - '3.7' + - '3.8' + - '3.9' + - '3.10' steps: - uses: actions/checkout@v2 + # Setup QEMU for ARM64 Build + - uses: docker/setup-qemu-action@v1 - uses: docker/setup-buildx-action@v1 with: version: "v0.5.1" @@ -34,7 +38,7 @@ jobs: with: context: ./python file: ./python/${{ matrix.tag }}/Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: | - ghcr.io/parkervcp/yolks:python_${{ matrix.tag }} \ No newline at end of file + ghcr.io/parkervcp/yolks:python_${{ matrix.tag }} diff --git a/.github/workflows/voice.yml b/.github/workflows/voice.yml index 719103e..6b3250e 100644 --- a/.github/workflows/voice.yml +++ b/.github/workflows/voice.yml @@ -1,6 +1,6 @@ name: build voice on: - # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: schedule: - cron: "0 0 * * 1" push: diff --git a/.github/workflows/wine.yml b/.github/workflows/wine.yml new file mode 100644 index 0000000..de31ef9 --- /dev/null +++ b/.github/workflows/wine.yml @@ -0,0 +1,38 @@ +name: build wine +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - wine/** +jobs: + push: + name: "yolks:wine_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - latest + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-buildx-action@v1 + with: + version: "v0.5.1" + buildkitd-flags: --debug + - uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + - uses: docker/build-push-action@v2 + with: + context: ./wine + file: ./wine/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/parkervcp/yolks:wine_${{ matrix.tag }} diff --git a/README.md b/README.md index 591624b..c2b666b 100644 --- a/README.md +++ b/README.md @@ -18,98 +18,134 @@ example of this would be something like Java or Python which are used for runnin 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. -### Contributing +## Contributing When adding a new version to an existing image, such as `java v42`, you'd add it within a child folder of `java`, so `java/42/Dockerfile` for example. Please also update the correct `.github/workflows` file to ensure that this new version is tagged correctly. ## Available Images + ### [Oses](/oses) + * [alpine](/oses/alpine) * `ghcr.io/parkervcp/yolks:alpine` * [debian](/oses/debian) * `ghcr.io/parkervcp/yolks:debian` * [ubuntu](/oses/ubuntu) * `ghcr.io/parkervcp/yolks:ubuntu` -### [Bot](/bot) - * [`bastion`](/bot/bastion) - * `ghcr.io/parkervcp/yolks:bot_bastion` - * [`parkertron`](/bot/parkertron) - * `ghcr.io/parkervcp/yolks:bot_parkertron` - * [`redbot`](/bot/red) - * `ghcr.io/parkervcp/yolks:bot_red` - * [`sinusbot`](/bot/sinusbot) - * `ghcr.io/parkervcp/yolks:bot_sinusbot` + +### [Bot](/bot) + +* [`bastion`](/bot/bastion) + * `ghcr.io/parkervcp/yolks:bot_bastion` +* [`parkertron`](/bot/parkertron) + * `ghcr.io/parkervcp/yolks:bot_parkertron` +* [`redbot`](/bot/red) + * `ghcr.io/parkervcp/yolks:bot_red` +* [`sinusbot`](/bot/sinusbot) + * `ghcr.io/parkervcp/yolks:bot_sinusbot` + ### [Cassandra](/cassandra) - * [`cassandra_java8_python27`](/cassandra/cassandra_java8_python2) - * `ghcr.io/parkervcp/yolks:cassandra_java11_python2` - * [`cassandra_java11_python3`](/cassandra/cassandra_java11_python3) - * `ghcr.io/parkervcp/yolks:cassandra_java11_python3` + +* [`cassandra_java8_python27`](/cassandra/cassandra_java8_python2) + * `ghcr.io/parkervcp/yolks:cassandra_java11_python2` +* [`cassandra_java11_python3`](/cassandra/cassandra_java11_python3) + * `ghcr.io/parkervcp/yolks:cassandra_java11_python3` + ### [dotNet](/dotnet) - * [`dotnet2.1`](/dotnet/2.1) - * `ghcr.io/parkervcp/yolks:dotnet_2.1` - * [`dotnet3.1`](/dotnet/3.1) - * `ghcr.io/parkervcp/yolks:dotnet_3.1` - * [`dotnet5.0`](/dotnet/5.0) - * `ghcr.io/parkervcp/yolks:dotnet_5.0` + +* [`dotnet2.1`](/dotnet/2.1) + * `ghcr.io/parkervcp/yolks:dotnet_2.1` +* [`dotnet3.1`](/dotnet/3.1) + * `ghcr.io/parkervcp/yolks:dotnet_3.1` +* [`dotnet5.0`](/dotnet/5) + * `ghcr.io/parkervcp/yolks:dotnet_5` +* [`dotnet6.0`](/dotnet/6) + * `ghcr.io/parkervcp/yolks:dotnet_6` + ### [Erlang](/erlang) - * [`erlang22`](/erlang/22) - * `ghcr.io/parkervcp/yolks:erlang_22` - * [`erlang23`](/erlang/23) - * `ghcr.io/parkervcp/yolks:erlang_23` - * [`erlang24`](/erlang/24) - * `ghcr.io/parkervcp/yolks:erlang_24` -### [Games](/games) - * [`arma3`](/games/arma3) - * `ghcr.io/parkervcp/games:arma3` - * [`fivem`](/games/fivem) - * `ghcr.io/parkervcp/games:fivem` - * [`source`](/games/source) - * `ghcr.io/parkervcp/games:source` + +* [`erlang22`](/erlang/22) + * `ghcr.io/parkervcp/yolks:erlang_22` +* [`erlang23`](/erlang/23) + * `ghcr.io/parkervcp/yolks:erlang_23` +* [`erlang24`](/erlang/24) + * `ghcr.io/parkervcp/yolks:erlang_24` + +### [Games](/games) + +* [`arma3`](/games/arma3) + * `ghcr.io/parkervcp/games:arma3` +* [`source`](/games/source) + * `ghcr.io/parkervcp/games:source` + ### [Golang](/go) - * [`go1.14`](/go/1.14) - * `ghcr.io/parkervcp/yolks:go_1.14` - * [`go1.15`](/go/1.15) - * `ghcr.io/parkervcp/yolks:go_1.15` - * [`go1.16`](/go/1.16) - * `ghcr.io/parkervcp/yolks:go_1.16` + +* [`go1.14`](/go/1.14) + * `ghcr.io/parkervcp/yolks:go_1.14` +* [`go1.15`](/go/1.15) + * `ghcr.io/parkervcp/yolks:go_1.15` +* [`go1.16`](/go/1.16) + * `ghcr.io/parkervcp/yolks:go_1.16` + ### [Java](/java) - * [`java7`](/java/7) - * `ghcr.io/parkervcp/yolks:java_7` - * [`java8`](/java/8) - * `ghcr.io/parkervcp/yolks:java_8` - * [`java9`](/java/9) - * `ghcr.io/parkervcp/yolks:java_9` - * [`java11`](/java/11) - * `ghcr.io/parkervcp/yolks:java_11` - * [`java14`](/java/14) - * `ghcr.io/parkervcp/yolks:java_14` - * [`java16`](/java/16) - * `ghcr.io/parkervcp/yolks:java_16` + +* [`java7`](/java/7) + * `ghcr.io/parkervcp/yolks:java_7` +* [`java8`](/java/8) + * `ghcr.io/parkervcp/yolks:java_8` +* [`java9`](/java/9) + * `ghcr.io/parkervcp/yolks:java_9` +* [`java11`](/java/11) + * `ghcr.io/parkervcp/yolks:java_11` +* [`java14`](/java/14) + * `ghcr.io/parkervcp/yolks:java_14` +* [`java16`](/java/16) + * `ghcr.io/parkervcp/yolks:java_16` +* [`java17`](/java/17) + * `ghcr.io/parkervcp/yolks:java_17` + +### [Mono](/mono) + +* [`mono_latest`](/mono/latest) + * `ghcr.io/parkervcp/yolks:mono_latest` + ### [Nodejs](/nodejs) - * [`node12`](/nodejs/12) - * `ghcr.io/parkervcp/yolks:nodejs_12` - * [`node14`](/nodejs/14) - * `ghcr.io/parkervcp/yolks:nodejs_14` - * [`node15`](/nodejs/15) - * `ghcr.io/parkervcp/yolks:nodejs_15` - * [`node16`](/nodejs/16) - * `ghcr.io/parkervcp/yolks:nodejs_16` + +* [`node12`](/nodejs/12) + * `ghcr.io/parkervcp/yolks:nodejs_12` +* [`node14`](/nodejs/14) + * `ghcr.io/parkervcp/yolks:nodejs_14` +* [`node16`](/nodejs/16) + * `ghcr.io/parkervcp/yolks:nodejs_16` +* [`node17`](/nodejs/17) + * `ghcr.io/parkervcp/yolks:nodejs_17` + ### [Python](/python) - * [`python3.7`](/python/3.7) - * `ghcr.io/parkervcp/yolks:python_3.7` - * [`python3.8`](/python/3.8) - * `ghcr.io/parkervcp/yolks:python_3.8` - * [`python3.9`](/python/3.9) - * `ghcr.io/parkervcp/yolks:python_3.9` + +* [`python3.7`](/python/3.7) + * `ghcr.io/parkervcp/yolks:python_3.7` +* [`python3.8`](/python/3.8) + * `ghcr.io/parkervcp/yolks:python_3.8` +* [`python3.9`](/python/3.9) + * `ghcr.io/parkervcp/yolks:python_3.9` +* [`python3.10`](/python/3.10) + * `ghcr.io/parkervcp/yolks:python_3.10` + ### [Voice](/voice) - * [`TeaSpeak`](/teaspeak) - * `ghcr.io/parkervcp/yolks:voice_teaspeak` + +* [`TeaSpeak`](/teaspeak) + * `ghcr.io/parkervcp/yolks:voice_teaspeak` + +### [Wine](/wine) + +* [`Wine`](/wine) + * `ghcr.io/parkervcp/yolks:wine_latest` + ### [Installation Images](/installers) * [`alpine-install`](/installers/alpine) * `ghcr.io/parkervcp/installers:alpine` - * [`debian-install`](/installers/debian) * `ghcr.io/parkervcp/installers:debian` diff --git a/dotnet/6/Dockerfile b/dotnet/6/Dockerfile new file mode 100644 index 0000000..8731c4c --- /dev/null +++ b/dotnet/6/Dockerfile @@ -0,0 +1,21 @@ +FROM --platform=$BUILDPLATFORM ghcr.io/parkervcp/yolks:debian + +LABEL author="Torsten Widmann" maintainer="info@goover.de" + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y apt-transport-https wget iproute2 \ + && wget https://packages.microsoft.com/config/debian/10/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-6.0 libgdiplus + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./../entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/games/arma3/entrypoint.sh b/games/arma3/entrypoint.sh index be87780..ecfb182 100644 --- a/games/arma3/entrypoint.sh +++ b/games/arma3/entrypoint.sh @@ -46,7 +46,7 @@ function RunSteamCMD { #[Input: int server=0 mod=1; int id] # Check if updating server or mod if [[ $1 == 0 ]]; then # Server - ${STEAMCMD_DIR}/steamcmd.sh "+login \"${STEAM_USER}\" \"${STEAM_PASS}\"" +force_install_dir /home/container +app_update $2 $extraFlags $validateServer +quit | tee -a "${STEAMCMD_LOG}" + ${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 diff --git a/games/fivem/Dockerfile b/games/fivem/Dockerfile deleted file mode 100644 index ece45de..0000000 --- a/games/fivem/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# -# 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=$BUILDPLATFORM alpine:latest - -LABEL author="Matthew Penner" maintainer="matthew@pterodactyl.io" - -LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" -LABEL org.opencontainers.image.licenses=MIT - -RUN apk add --update --no-cache ca-certificates c-ares icu-libs libssl1.1 libunwind musl musl-dbg tzdata zlib \ - && 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/games/fivem/entrypoint.sh b/games/fivem/entrypoint.sh deleted file mode 100644 index 83f6218..0000000 --- a/games/fivem/entrypoint.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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;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' | eval echo "$(cat -)") - -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED" -# shellcheck disable=SC2086 -exec env ${PARSED} diff --git a/games/source/Dockerfile b/games/source/Dockerfile index 8ce953a..617a9f6 100644 --- a/games/source/Dockerfile +++ b/games/source/Dockerfile @@ -30,10 +30,16 @@ LABEL org.opencontainers.image.licenses=MIT 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 libssl1.1: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 tzdata \ - && useradd -m -d /home/container container + && 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 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata \ + && useradd -m -d /home/container container + +## install rcon +RUN cd /tmp/ \ + && curl -sSL https://github.com/gorcon/rcon-cli/releases/download/v0.10.1/rcon-0.10.1-amd64_linux.tar.gz > rcon.tar.gz \ + && tar xvf rcon.tar.gz \ + && mv rcon-0.10.1-amd64_linux/rcon /usr/local/bin/ USER container ENV USER=container HOME=/home/container diff --git a/games/source/entrypoint.sh b/games/source/entrypoint.sh index b04e3c6..f2f2744 100644 --- a/games/source/entrypoint.sh +++ b/games/source/entrypoint.sh @@ -22,6 +22,9 @@ # SOFTWARE. # +# Wait for the container to fully initialize +sleep 1 + # Default the TZ environment variable to UTC. TZ=${TZ:-UTC} export TZ @@ -33,10 +36,6 @@ 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' | eval echo "$(cat -)") ## just in case someone removed the defaults. if [ "${STEAM_USER}" == "" ]; then @@ -53,7 +52,7 @@ fi if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then # Update Source Server if [ ! -z ${SRCDS_APPID} ]; then - ./steamcmd/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +force_install_dir /home/container +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 + ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +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 @@ -62,8 +61,9 @@ else echo -e "Not updating game server as auto update was set to 0. Starting Server" fi -# Display the command we're running in the output, and then execute it with the env -# from the container itself. -printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED" -# shellcheck disable=SC2086 -exec env ${PARSED} +# 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/installers/debian/Dockerfile b/installers/debian/Dockerfile index 6c3568c..e671c61 100644 --- a/installers/debian/Dockerfile +++ b/installers/debian/Dockerfile @@ -32,4 +32,4 @@ ENV DEBIAN_FRONTEND=noninteractive RUN dpkg --add-architecture i386 \ && apt update \ && apt upgrade -y \ - && apt -y --no-install-recommends install ca-certificates curl lib32gcc-s1 libsdl2-2.0-0:i386 git + && apt -y --no-install-recommends install ca-certificates curl lib32gcc-s1 libsdl2-2.0-0:i386 git unzip zip tar jq diff --git a/java/11/Dockerfile b/java/11/Dockerfile index 16f2e0e..deeca3d 100644 --- a/java/11/Dockerfile +++ b/java/11/Dockerfile @@ -1,13 +1,13 @@ -FROM --platform=$BUILDPLATFORM openjdk:11-slim +FROM --platform=$TARGETOS/$TARGETARCH openjdk:11-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" LABEL org.opencontainers.image.licenses=MIT -RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 \ - && useradd -d /home/container -m container +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 \ + && useradd -d /home/container -m container USER container ENV USER=container HOME=/home/container diff --git a/java/11j9/Dockerfile b/java/11j9/Dockerfile index 6a401a5..e7ec1e9 100644 --- a/java/11j9/Dockerfile +++ b/java/11j9/Dockerfile @@ -1,10 +1,10 @@ -FROM --platform=$BUILDPLATFORM adoptopenjdk/openjdk11-openj9:debianslim +FROM --platform=$TARGETOS/$TARGETARCH adoptopenjdk/openjdk11-openj9:debianslim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" -RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 \ - && useradd -d /home/container -m container +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 \ + && useradd -d /home/container -m container USER container ENV USER=container HOME=/home/container diff --git a/java/16/Dockerfile b/java/16/Dockerfile index 17687aa..e1afe37 100644 --- a/java/16/Dockerfile +++ b/java/16/Dockerfile @@ -1,13 +1,13 @@ -FROM --platform=$BUILDPLATFORM openjdk:16-slim +FROM --platform=$TARGETOS/$TARGETARCH openjdk:16-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" LABEL org.opencontainers.image.licenses=MIT -RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 \ - && useradd -d /home/container -m container +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 \ + && useradd -d /home/container -m container USER container ENV USER=container HOME=/home/container diff --git a/java/16j9/Dockerfile b/java/16j9/Dockerfile index 6ae6c83..306ca7c 100644 --- a/java/16j9/Dockerfile +++ b/java/16j9/Dockerfile @@ -1,10 +1,10 @@ -FROM --platform=$BUILDPLATFORM adoptopenjdk/openjdk16-openj9:debianslim +FROM --platform=$TARGETOS/$TARGETARCH adoptopenjdk/openjdk16-openj9:debianslim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" -RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 \ - && useradd -d /home/container -m container +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 \ + && useradd -d /home/container -m container USER container ENV USER=container HOME=/home/container diff --git a/java/17/Dockerfile b/java/17/Dockerfile new file mode 100644 index 0000000..2fa7efa --- /dev/null +++ b/java/17/Dockerfile @@ -0,0 +1,17 @@ +FROM --platform=$TARGETOS/$TARGETARCH openjdk:17-slim + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" +LABEL org.opencontainers.image.licenses=MIT + +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 \ + && 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/java/8/Dockerfile b/java/8/Dockerfile index e220ce6..7bd75a1 100644 --- a/java/8/Dockerfile +++ b/java/8/Dockerfile @@ -1,13 +1,13 @@ -FROM --platform=$BUILDPLATFORM openjdk:8-slim-buster +FROM --platform=$TARGETOS/$TARGETARCH openjdk:8-slim-buster LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" LABEL org.opencontainers.image.licenses=MIT -RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 \ - && useradd -d /home/container -m container +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 \ + && useradd -d /home/container -m container USER container ENV USER=container HOME=/home/container diff --git a/java/8j9/Dockerfile b/java/8j9/Dockerfile index 62fe586..590623f 100644 --- a/java/8j9/Dockerfile +++ b/java/8j9/Dockerfile @@ -1,10 +1,10 @@ -FROM --platform=$BUILDPLATFORM adoptopenjdk/openjdk8-openj9:debianslim +FROM --platform=$TARGETOS/$TARGETARCH adoptopenjdk/openjdk8-openj9:debianslim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" -RUN apt-get update -y \ - && apt-get install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 \ - && useradd -d /home/container -m container +RUN apt update -y \ + && apt install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 libfreetype6 \ + && useradd -d /home/container -m container USER container ENV USER=container HOME=/home/container diff --git a/mono/entrypoint.sh b/mono/entrypoint.sh new file mode 100644 index 0000000..ef6ae2e --- /dev/null +++ b/mono/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;exit}'` + +# Replace Startup Variables +MODIFIED_STARTUP="eval $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')" +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +${MODIFIED_STARTUP} diff --git a/mono/latest/Dockerfile b/mono/latest/Dockerfile new file mode 100644 index 0000000..041d65a --- /dev/null +++ b/mono/latest/Dockerfile @@ -0,0 +1,22 @@ +# ---------------------------------- +# Mono Latest Image +# Minimum Panel Version: 1.2.x +# ---------------------------------- +FROM ghcr.io/parkervcp/yolks:debian + +LABEL author="Torsten Widmann" maintainer="support@goover.de" + +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 mono-complete -y + +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 index 88c6b21..da1ae9b 100644 --- a/nodejs/12/Dockerfile +++ b/nodejs/12/Dockerfile @@ -1,9 +1,10 @@ -FROM node:12-buster-slim +FROM --platform=$TARGETOS/$TARGETARCH node:12-bullseye-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" RUN apt update \ - && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip \ + && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool \ + && npm -g install npm@latest \ && useradd -m -d /home/container container USER container @@ -11,4 +12,4 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh -CMD ["/bin/bash", "/entrypoint.sh"] +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/nodejs/14/Dockerfile b/nodejs/14/Dockerfile index 4306113..d5ac2ec 100644 --- a/nodejs/14/Dockerfile +++ b/nodejs/14/Dockerfile @@ -1,9 +1,10 @@ -FROM node:14-buster-slim +FROM --platform=$TARGETOS/$TARGETARCH node:14-bullseye-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" RUN apt update \ - && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip \ + && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool \ + && npm -g install npm@latest \ && useradd -m -d /home/container container USER container @@ -11,4 +12,4 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh -CMD ["/bin/bash", "/entrypoint.sh"] +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/nodejs/16/Dockerfile b/nodejs/16/Dockerfile index 4eb64b0..354df7b 100644 --- a/nodejs/16/Dockerfile +++ b/nodejs/16/Dockerfile @@ -1,9 +1,10 @@ -FROM node:16-buster-slim +FROM --platform=$TARGETOS/$TARGETARCH node:16-bullseye-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" RUN apt update \ - && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip \ + && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool \ + && npm -g install npm@latest \ && useradd -m -d /home/container container USER container @@ -11,4 +12,4 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh -CMD ["/bin/bash", "/entrypoint.sh"] +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/nodejs/15/Dockerfile b/nodejs/17/Dockerfile similarity index 68% rename from nodejs/15/Dockerfile rename to nodejs/17/Dockerfile index 43cf02c..9a35af5 100644 --- a/nodejs/15/Dockerfile +++ b/nodejs/17/Dockerfile @@ -1,9 +1,10 @@ -FROM node:15-buster-slim +FROM --platform=$TARGETOS/$TARGETARCH node:17-bullseye-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" RUN apt update \ - && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip \ + && apt -y install ffmpeg iproute2 git sqlite3 libsqlite3-dev python3 python3-dev ca-certificates dnsutils tzdata zip tar curl build-essential libtool \ + && npm -g install npm@latest \ && useradd -m -d /home/container container USER container @@ -11,4 +12,4 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./../entrypoint.sh /entrypoint.sh -CMD ["/bin/bash", "/entrypoint.sh"] +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/oses/debian/Dockerfile b/oses/debian/Dockerfile index d6c866e..b0a4c9f 100644 --- a/oses/debian/Dockerfile +++ b/oses/debian/Dockerfile @@ -1,30 +1,33 @@ -FROM debian:buster-slim +FROM debian:bullseye-slim -LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" -ENV DEBIAN_FRONTEND noninteractive +LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" +LABEL org.opencontainers.image.licenses=MIT -## add container user -RUN useradd -m -d /home/container -s /bin/bash container +ENV DEBIAN_FRONTEND noninteractive -RUN ln -s /home/container/ /nonexistent +RUN useradd -m -d /home/container -s /bin/bash container -ENV USER=container HOME=/home/container +RUN ln -s /home/container/ /nonexistent -## update base packages -RUN apt update \ - && apt upgrade -y +ENV USER=container HOME=/home/container -## install dependencies -RUN apt install -y gcc g++ libgcc1 lib32gcc1 libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ - libfontconfig libicu63 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadbclient-dev libduktape203 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata \ - liblua5.3 libz-dev rapidjson-dev lib32stdc++6 libstdc++5:i386 +## Update base packages +RUN apt update \ + && apt upgrade -y -## configure locale -RUN update-locale lang=en_US.UTF-8 \ - && dpkg-reconfigure --frontend noninteractive locales +## Install dependencies +RUN apt install -y gcc g++ libgcc1 lib32gcc-s1 libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig libicu67 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadbclient-dev-compat libduktape205 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ + liblua5.4-0 libz-dev rapidjson-dev tzdata libevent-dev lib32stdc++6 libstdc++5:i386 -WORKDIR /home/container +## Configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + -COPY ./entrypoint.sh /entrypoint.sh -CMD ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] diff --git a/oses/ubuntu/Dockerfile b/oses/ubuntu/Dockerfile index 6a4b4f8..d6f3a62 100644 --- a/oses/ubuntu/Dockerfile +++ b/oses/ubuntu/Dockerfile @@ -14,11 +14,13 @@ RUN apt update \ ## install dependencies RUN apt install -y gcc g++ libgcc1 lib32gcc1 libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ libfontconfig libicu60 libiculx60 icu-devtools libunwind8 libssl1.0.0 libssl1.0-dev sqlite3 libsqlite3-dev libmariadbclient-dev libduktape202 libzip4 locales ffmpeg apt-transport-https init-system-helpers \ - libcurl3-gnutls libjsoncpp1 libleveldb1v5 liblua5.1-0 libluajit-5.1-2 libsqlite3-0 libfluidsynth1 bzip2 zlib1g + libcurl3-gnutls libjsoncpp1 libleveldb1v5 liblua5.1-0 libluajit-5.1-2 libsqlite3-0 libfluidsynth1 bzip2 zlib1g libevent-dev ## configure locale RUN update-locale lang=en_US.UTF-8 \ && dpkg-reconfigure --frontend noninteractive locales +WORKDIR /home/container + COPY ./entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/python/2.7/Dockerfile b/python/2.7/Dockerfile index 798f58f..bcfac0d 100644 --- a/python/2.7/Dockerfile +++ b/python/2.7/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2.7-slim +FROM --platform=$TARGETOS/$TARGETARCH python:2.7-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/python/3.10/Dockerfile b/python/3.10/Dockerfile new file mode 100644 index 0000000..5f6d9f3 --- /dev/null +++ b/python/3.10/Dockerfile @@ -0,0 +1,14 @@ +FROM --platform=$TARGETOS/$TARGETARCH python:3.10-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 \ + && 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/python/3.7/Dockerfile b/python/3.7/Dockerfile index c361acb..bad33ac 100644 --- a/python/3.7/Dockerfile +++ b/python/3.7/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.7-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/python/3.8/Dockerfile b/python/3.8/Dockerfile index 7168292..dae396d 100644 --- a/python/3.8/Dockerfile +++ b/python/3.8/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.8-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/python/3.9/Dockerfile b/python/3.9/Dockerfile index 24c1ac0..e9843f8 100644 --- a/python/3.9/Dockerfile +++ b/python/3.9/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-slim +FROM --platform=$TARGETOS/$TARGETARCH python:3.9-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/wine/entrypoint.sh b/wine/entrypoint.sh new file mode 100644 index 0000000..c98e308 --- /dev/null +++ b/wine/entrypoint.sh @@ -0,0 +1,84 @@ +#!/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. +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +## 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 ${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.2/wine_gecko-2.47.2-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.2/wine_gecko-2.47.2-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 http://dl.winehq.org/wine/wine-mono/6.4.0/wine-mono-6.4.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..7ab8e30 --- /dev/null +++ b/wine/latest/Dockerfile @@ -0,0 +1,40 @@ +# ---------------------------------- +# Generic Wine 6 image +# ---------------------------------- +FROM ghcr.io/parkervcp/yolks:debian + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +## install required packages +RUN dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y --no-install-recommends gnupg2 software-properties-common libntlm0 winbind xvfb xauth python3 libncurses5:i386 libncurses6:i386 + +# Install winehq-stable and with recommends +RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key \ + && apt-key add winehq.key \ + && echo "deb https://dl.winehq.org/wine-builds/debian/ bullseye main" >> /etc/apt/sources.list \ + && wget -O- -q download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_11/Release.key | apt-key add - \ + && echo "deb http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_11 ./" | tee /etc/apt/sources.list.d/wine-obs.list \ + && apt update \ + && apt install -y --install-recommends winehq-stable cabextract xvfb + +# 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 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 + +USER container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"]