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"