From d07eb520b5e905ea5073ea015beda6faf0fe13c8 Mon Sep 17 00:00:00 2001 From: Michael Parker Date: Mon, 26 Sep 2022 15:00:32 -0400 Subject: [PATCH] add mumble image --- .github/workflows/voice.yml | 1 + voice/mumble/Dockerfile | 18 ++++++++++++++++++ voice/mumble/entrypoint.sh | 16 ++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 voice/mumble/Dockerfile create mode 100644 voice/mumble/entrypoint.sh diff --git a/.github/workflows/voice.yml b/.github/workflows/voice.yml index 6a6dece..331a198 100644 --- a/.github/workflows/voice.yml +++ b/.github/workflows/voice.yml @@ -17,6 +17,7 @@ jobs: matrix: tag: - teaspeak + - mumble steps: - uses: actions/checkout@v3 - uses: docker/setup-buildx-action@v2 diff --git a/voice/mumble/Dockerfile b/voice/mumble/Dockerfile new file mode 100644 index 0000000..b3a656d --- /dev/null +++ b/voice/mumble/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$TARGETOS/$TARGETARCH alpine:3.16 + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolks" +LABEL org.opencontainers.image.licenses=MIT + +## install dependencies +RUN apk add --no-cache murmur + +RUN adduser -D 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/mumble/entrypoint.sh b/voice/mumble/entrypoint.sh new file mode 100644 index 0000000..4b50be7 --- /dev/null +++ b/voice/mumble/entrypoint.sh @@ -0,0 +1,16 @@ +#!/bin/ash +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} \ No newline at end of file