From 68ef32ee2a3fd2363fcfb4393545af7485805359 Mon Sep 17 00:00:00 2001 From: softwarenoob Date: Mon, 24 Jan 2022 17:41:43 +0200 Subject: [PATCH 1/4] ci(redis): fix registry typo --- .github/workflows/redis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/redis.yml b/.github/workflows/redis.yml index d1a7552..9752964 100644 --- a/.github/workflows/redis.yml +++ b/.github/workflows/redis.yml @@ -28,7 +28,7 @@ jobs: buildkitd-flags: --debug - uses: docker/login-action@v1 with: - egistry: ghcr.io + registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.REGISTRY_TOKEN }} - uses: docker/build-push-action@v2 From c263e42dacc94f6edbea3bc32afd041ad9069017 Mon Sep 17 00:00:00 2001 From: Torsten Widmann Date: Tue, 25 Jan 2022 16:08:35 +0100 Subject: [PATCH 2/4] feat: add PostgreSQL/MongoDB Images and fix multiarch (#40) add PostgreSQL/MongoDB Images and fixes multi-arch builds for MariaDB, Redis. --- .github/workflows/mongodb.yml | 41 +++++++++++++++++++++++++++++++ .github/workflows/postgres.yml | 45 ++++++++++++++++++++++++++++++++++ README.md | 20 +++++++++++++++ mariadb/10.3/Dockerfile | 2 +- mariadb/10.4/Dockerfile | 2 +- mariadb/10.5/Dockerfile | 2 +- mariadb/10.6/Dockerfile | 2 +- mariadb/10.7/Dockerfile | 2 +- mongodb/4/Dockerfile | 19 ++++++++++++++ mongodb/5/Dockerfile | 19 ++++++++++++++ mongodb/entrypoint.sh | 12 +++++++++ postgres/10/Dockerfile | 16 ++++++++++++ postgres/11/Dockerfile | 16 ++++++++++++ postgres/12/Dockerfile | 16 ++++++++++++ postgres/13/Dockerfile | 16 ++++++++++++ postgres/14/Dockerfile | 16 ++++++++++++ postgres/9/Dockerfile | 16 ++++++++++++ postgres/entrypoint.sh | 15 ++++++++++++ redis/5/Dockerfile | 2 +- redis/6/Dockerfile | 2 +- 20 files changed, 274 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/mongodb.yml create mode 100644 .github/workflows/postgres.yml create mode 100644 mongodb/4/Dockerfile create mode 100644 mongodb/5/Dockerfile create mode 100644 mongodb/entrypoint.sh create mode 100644 postgres/10/Dockerfile create mode 100644 postgres/11/Dockerfile create mode 100644 postgres/12/Dockerfile create mode 100644 postgres/13/Dockerfile create mode 100644 postgres/14/Dockerfile create mode 100644 postgres/9/Dockerfile create mode 100644 postgres/entrypoint.sh diff --git a/.github/workflows/mongodb.yml b/.github/workflows/mongodb.yml new file mode 100644 index 0000000..71c2d89 --- /dev/null +++ b/.github/workflows/mongodb.yml @@ -0,0 +1,41 @@ +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/** +jobs: + push: + name: "yolks:mongodb_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 4 + - 5 + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-qemu-action@v1 + - 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: ./mongodb + file: ./mongodb/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/parkervcp/yolks:mongodb_${{ matrix.tag }} diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml new file mode 100644 index 0000000..984e616 --- /dev/null +++ b/.github/workflows/postgres.yml @@ -0,0 +1,45 @@ +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/** +jobs: + push: + name: "yolks:postgres_${{ matrix.tag }}" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tag: + - 9 + - 10 + - 11 + - 12 + - 13 + - 14 + steps: + - uses: actions/checkout@v2 + - uses: docker/setup-qemu-action@v1 + - 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: ./postgres + file: ./postgres/${{ matrix.tag }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/parkervcp/yolks:postgres_${{ matrix.tag }} diff --git a/README.md b/README.md index b7e770c..c3578f3 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,12 @@ is tagged correctly. * [`MariaDB 10.7`](/mariadb/10.7) * `ghcr.io/parkervcp/yolks:mariadb_10.7` +### [MongoDB](/mongodb) + * [`MongoDB 4`](/mongodb/4) + * `ghcr.io/parkervcp/yolks:mongodb_4` + * [`MongoDB 5`](/mongodb/5) + * `ghcr.io/parkervcp/yolks:mongodb_5` + ### [Mono](/mono) * [`mono_latest`](/mono/latest) * `ghcr.io/parkervcp/yolks:mono_latest` @@ -133,6 +139,20 @@ is tagged correctly. * [`node17`](/nodejs/17) * `ghcr.io/parkervcp/yolks:nodejs_17` +### [PostgreSQL](/postgres) + * [`Postgres 9`](/postgres/9) + * `ghcr.io/parkervcp/yolks:postgres_9` + * [`Postgres 10`](/postgres/10) + * `ghcr.io/parkervcp/yolks:postgres_10` + * [`Postgres 11`](/postgres/11) + * `ghcr.io/parkervcp/yolks:postgres_11` + * [`Postgres 12`](/postgres/12) + * `ghcr.io/parkervcp/yolks:postgres_12` + * [`Postgres 13`](/postgres/13) + * `ghcr.io/parkervcp/yolks:postgres_13` + * [`Postgres 14`](/postgres/14) + * `ghcr.io/parkervcp/yolks:postgres_14` + ### [Python](/python) * [`python3.7`](/python/3.7) diff --git a/mariadb/10.3/Dockerfile b/mariadb/10.3/Dockerfile index f5948c8..ef1ea23 100644 --- a/mariadb/10.3/Dockerfile +++ b/mariadb/10.3/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------- # MariaDB Image for Pterodactyl # ----------------------------------------------------- -FROM mariadb:10.3 +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.3 LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/mariadb/10.4/Dockerfile b/mariadb/10.4/Dockerfile index fdd6712..5f0193c 100644 --- a/mariadb/10.4/Dockerfile +++ b/mariadb/10.4/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------- # MariaDB Image for Pterodactyl # ----------------------------------------------------- -FROM mariadb:10.4 +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.4 LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/mariadb/10.5/Dockerfile b/mariadb/10.5/Dockerfile index 3e18fa9..f990e81 100644 --- a/mariadb/10.5/Dockerfile +++ b/mariadb/10.5/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------- # MariaDB Image for Pterodactyl # ----------------------------------------------------- -FROM mariadb:10.5 +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.5 LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/mariadb/10.6/Dockerfile b/mariadb/10.6/Dockerfile index a9fc85e..e4adf95 100644 --- a/mariadb/10.6/Dockerfile +++ b/mariadb/10.6/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------- # MariaDB Image for Pterodactyl # ----------------------------------------------------- -FROM mariadb:10.6 +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.6 LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/mariadb/10.7/Dockerfile b/mariadb/10.7/Dockerfile index 125f99d..f05b006 100644 --- a/mariadb/10.7/Dockerfile +++ b/mariadb/10.7/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------- # MariaDB Image for Pterodactyl # ----------------------------------------------------- -FROM mariadb:10.7 +FROM --platform=$TARGETOS/$TARGETARCH mariadb:10.7 LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/mongodb/4/Dockerfile b/mongodb/4/Dockerfile new file mode 100644 index 0000000..52b6885 --- /dev/null +++ b/mongodb/4/Dockerfile @@ -0,0 +1,19 @@ +# ---------------------------------- +# Environment: MongoDB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mongo:4-focal + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +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/5/Dockerfile b/mongodb/5/Dockerfile new file mode 100644 index 0000000..0b70021 --- /dev/null +++ b/mongodb/5/Dockerfile @@ -0,0 +1,19 @@ +# ---------------------------------- +# Environment: MongoDB +# ---------------------------------- +FROM --platform=$TARGETOS/$TARGETARCH mongo:5-focal + +LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" + +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/entrypoint.sh b/mongodb/entrypoint.sh new file mode 100644 index 0000000..cd80a9a --- /dev/null +++ b/mongodb/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=$(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo ":/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..44467e1 --- /dev/null +++ b/postgres/10/Dockerfile @@ -0,0 +1,16 @@ +# ---------------------------------- +# 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 + +USER container +ENV HOME /home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/postgres/11/Dockerfile b/postgres/11/Dockerfile new file mode 100644 index 0000000..7b0b6a0 --- /dev/null +++ b/postgres/11/Dockerfile @@ -0,0 +1,16 @@ +# ---------------------------------- +# 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 + +USER container +ENV HOME /home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/postgres/12/Dockerfile b/postgres/12/Dockerfile new file mode 100644 index 0000000..ee9075e --- /dev/null +++ b/postgres/12/Dockerfile @@ -0,0 +1,16 @@ +# ---------------------------------- +# 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 + +USER container +ENV HOME /home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/postgres/13/Dockerfile b/postgres/13/Dockerfile new file mode 100644 index 0000000..9d6d418 --- /dev/null +++ b/postgres/13/Dockerfile @@ -0,0 +1,16 @@ +# ---------------------------------- +# 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 + +USER container +ENV HOME /home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/postgres/14/Dockerfile b/postgres/14/Dockerfile new file mode 100644 index 0000000..77c1fee --- /dev/null +++ b/postgres/14/Dockerfile @@ -0,0 +1,16 @@ +# ---------------------------------- +# 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 + +USER container +ENV HOME /home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/postgres/9/Dockerfile b/postgres/9/Dockerfile new file mode 100644 index 0000000..c410d10 --- /dev/null +++ b/postgres/9/Dockerfile @@ -0,0 +1,16 @@ +# ---------------------------------- +# 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 + +USER container +ENV HOME /home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD ["/bin/bash", "/entrypoint.sh"] diff --git a/postgres/entrypoint.sh b/postgres/entrypoint.sh new file mode 100644 index 0000000..0a72c42 --- /dev/null +++ b/postgres/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/ash +cd /home/container + +#output current postgres version +postgres --version + +# 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 $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} diff --git a/redis/5/Dockerfile b/redis/5/Dockerfile index f1ddfc3..0bf23ec 100644 --- a/redis/5/Dockerfile +++ b/redis/5/Dockerfile @@ -1,7 +1,7 @@ # ---------------------------------- # Environment: redis # ---------------------------------- -FROM redis:5-bullseye +FROM --platform=$TARGETOS/$TARGETARCH redis:5-bullseye LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" diff --git a/redis/6/Dockerfile b/redis/6/Dockerfile index 547dd17..6e253e4 100644 --- a/redis/6/Dockerfile +++ b/redis/6/Dockerfile @@ -1,7 +1,7 @@ # ---------------------------------- # Environment: redis # ---------------------------------- -FROM redis:6-bullseye +FROM --platform=$TARGETOS/$TARGETARCH redis:6-bullseye LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" From a93590f3a1b01ce56fe0e9efca93470e02bdbb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Gardstr=C3=B6m?= Date: Tue, 1 Feb 2022 22:48:21 +0100 Subject: [PATCH 3/4] change startup parsing to eval done for similar reason as 2e366792c15eba443cea2b7ea38abf396d9f9c31 --- java/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/entrypoint.sh b/java/entrypoint.sh index 012d126..b6d29da 100644 --- a/java/entrypoint.sh +++ b/java/entrypoint.sh @@ -46,4 +46,4 @@ PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat # from the container itself. printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0m%s\n" "$PARSED" # shellcheck disable=SC2086 -exec env ${PARSED} +eval ${PARSED} From 7caf182f27bec37cf0b5de839f54d6cd67a4f641 Mon Sep 17 00:00:00 2001 From: Torsten Widmann Date: Thu, 3 Feb 2022 17:32:47 +0100 Subject: [PATCH 4/4] update repo url to debian 11 (#42) --- dotnet/2.1/Dockerfile | 2 +- dotnet/3.1/Dockerfile | 2 +- dotnet/5/Dockerfile | 2 +- dotnet/6/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/2.1/Dockerfile b/dotnet/2.1/Dockerfile index f5167b6..f85a2c4 100644 --- a/dotnet/2.1/Dockerfile +++ b/dotnet/2.1/Dockerfile @@ -7,7 +7,7 @@ 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 \ + && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \ && apt update -y \ diff --git a/dotnet/3.1/Dockerfile b/dotnet/3.1/Dockerfile index b63d1a1..1dae74c 100644 --- a/dotnet/3.1/Dockerfile +++ b/dotnet/3.1/Dockerfile @@ -7,7 +7,7 @@ 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 \ + && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \ && apt update -y \ diff --git a/dotnet/5/Dockerfile b/dotnet/5/Dockerfile index 7a3d14b..934d73e 100644 --- a/dotnet/5/Dockerfile +++ b/dotnet/5/Dockerfile @@ -7,7 +7,7 @@ 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 \ + && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \ && apt update -y \ diff --git a/dotnet/6/Dockerfile b/dotnet/6/Dockerfile index 8731c4c..38307bd 100644 --- a/dotnet/6/Dockerfile +++ b/dotnet/6/Dockerfile @@ -7,7 +7,7 @@ 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 \ + && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && rm packages-microsoft-prod.deb \ && apt update -y \