From 5d0419978965dbff762ed5e78dbf78bd81da5217 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Fri, 10 Sep 2021 08:59:01 +0200 Subject: [PATCH 1/3] add teaspeak image --- .github/workflows/voice.yml | 38 ++++++++++++++++++++++++++ README.md | 4 ++- voice/teaspeak/Dockerfile | 52 ++++++++++++++++++++++++++++++++++++ voice/teaspeak/entrypoint.sh | 24 +++++++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/voice.yml create mode 100644 voice/teaspeak/Dockerfile create mode 100644 voice/teaspeak/entrypoint.sh diff --git a/.github/workflows/voice.yml b/.github/workflows/voice.yml new file mode 100644 index 0000000..719103e --- /dev/null +++ b/.github/workflows/voice.yml @@ -0,0 +1,38 @@ +name: build voice +on: + # Allows you to run this workflow manually from the Actions tab + schedule: + - cron: "0 0 * * 1" + push: + branches: + - master + paths: + - voice/** +jobs: + push: + name: "yolks:voice_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - teaspeak + 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: ./voice/${{ matrix.tag }} + file: ./voice/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/parkervcp/yolks:voice_${{ matrix.tag }} diff --git a/README.md b/README.md index 2ac804b..9a08c17 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,9 @@ is tagged correctly. * `ghcr.io/parkervcp/yolks:python_3.8` * [`python3.9`](/python/3.9) * `ghcr.io/parkervcp/yolks:python_3.9` - +### [Voice](/voice) + * [`TeaSpeak`](/teaspeak) + * `ghcr.io/parkervcp/yolks:voice:teaspeak` ### [Installation Images](/installers) * [`alpine-install`](/installers/alpine) diff --git a/voice/teaspeak/Dockerfile b/voice/teaspeak/Dockerfile new file mode 100644 index 0000000..809b228 --- /dev/null +++ b/voice/teaspeak/Dockerfile @@ -0,0 +1,52 @@ +# +# Copyright (c) 2021 Torsten Widmann +# +# 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 debian:stable-slim + +LABEL author="Torsten Widmann" maintainer="info@goover.de" + +LABEL org.opencontainers.image.source="https://github.com/pterodactyl/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 + +# Install latest youtube-dl +RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -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 + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/voice/teaspeak/entrypoint.sh b/voice/teaspeak/entrypoint.sh new file mode 100644 index 0000000..49123df --- /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;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' | 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} From 383f147a53180f04bcea9fc0a41fa808f8a05cd7 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Fri, 10 Sep 2021 09:07:56 +0200 Subject: [PATCH 2/3] fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a08c17..d6c2a56 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ is tagged correctly. * `ghcr.io/parkervcp/yolks:python_3.9` ### [Voice](/voice) * [`TeaSpeak`](/teaspeak) - * `ghcr.io/parkervcp/yolks:voice:teaspeak` + * `ghcr.io/parkervcp/yolks:voice_teaspeak` ### [Installation Images](/installers) * [`alpine-install`](/installers/alpine) From 26eac566d16668a9cdbac63dc3060156ab1edcf7 Mon Sep 17 00:00:00 2001 From: gOOvER Date: Fri, 10 Sep 2021 11:30:27 +0200 Subject: [PATCH 3/3] add missing Bot Section --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d6c2a56..591624b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,16 @@ is tagged correctly. * [debian](/oses/debian) * `ghcr.io/parkervcp/yolks:debian` * [ubuntu](/oses/ubuntu) - * `ghcr.io/parkervcp/yolks: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` ### [Cassandra](/cassandra) * [`cassandra_java8_python27`](/cassandra/cassandra_java8_python2) * `ghcr.io/parkervcp/yolks:cassandra_java11_python2`