diff --git a/golang/1.14/alpine/Dockerfile b/golang/1.14/alpine/Dockerfile new file mode 100644 index 0000000..9e75f0d --- /dev/null +++ b/golang/1.14/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.14-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.14/debian/Dockerfile b/golang/1.14/debian/Dockerfile new file mode 100644 index 0000000..a9d1dd2 --- /dev/null +++ b/golang/1.14/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.14-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.15/alpine/Dockerfile b/golang/1.15/alpine/Dockerfile new file mode 100644 index 0000000..4aca12c --- /dev/null +++ b/golang/1.15/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.15.15-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.15/debian/Dockerfile b/golang/1.15/debian/Dockerfile new file mode 100644 index 0000000..1aabf13 --- /dev/null +++ b/golang/1.15/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.15.15-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.16/alpine/Dockerfile b/golang/1.16/alpine/Dockerfile new file mode 100644 index 0000000..696c2da --- /dev/null +++ b/golang/1.16/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.16.15-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.16/debian/Dockerfile b/golang/1.16/debian/Dockerfile new file mode 100644 index 0000000..4c65317 --- /dev/null +++ b/golang/1.16/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.16.15-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.17/alpine/Dockerfile b/golang/1.17/alpine/Dockerfile new file mode 100644 index 0000000..5cd894a --- /dev/null +++ b/golang/1.17/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.17.13-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.17/debian/Dockerfile b/golang/1.17/debian/Dockerfile new file mode 100644 index 0000000..1d94012 --- /dev/null +++ b/golang/1.17/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.17.13-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.18/alpine/Dockerfile b/golang/1.18/alpine/Dockerfile new file mode 100644 index 0000000..17ad712 --- /dev/null +++ b/golang/1.18/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.18.10-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.18/debian/Dockerfile b/golang/1.18/debian/Dockerfile new file mode 100644 index 0000000..c861059 --- /dev/null +++ b/golang/1.18/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.18.10-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.19/alpine/Dockerfile b/golang/1.19/alpine/Dockerfile new file mode 100644 index 0000000..3b0ae11 --- /dev/null +++ b/golang/1.19/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.19.13-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.19/debian/Dockerfile b/golang/1.19/debian/Dockerfile new file mode 100644 index 0000000..045a6ae --- /dev/null +++ b/golang/1.19/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.19.13-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.20/alpine/Dockerfile b/golang/1.20/alpine/Dockerfile new file mode 100644 index 0000000..27a21a5 --- /dev/null +++ b/golang/1.20/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.20.12-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.20/debian/Dockerfile b/golang/1.20/debian/Dockerfile new file mode 100644 index 0000000..6a16822 --- /dev/null +++ b/golang/1.20/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.20.12-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.21/alpine/Dockerfile b/golang/1.21/alpine/Dockerfile new file mode 100644 index 0000000..9be2293 --- /dev/null +++ b/golang/1.21/alpine/Dockerfile @@ -0,0 +1,16 @@ +# TAGS: latest +# VARIANT: alpine +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.21.5-alpine + +ARG BUILDPLATFORM + +RUN apk add --update --no-cache tini ca-certificates curl ffmpeg git openssl sqlite tar tzdata build-base \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/1.21/debian/Dockerfile b/golang/1.21/debian/Dockerfile new file mode 100644 index 0000000..85d51dc --- /dev/null +++ b/golang/1.21/debian/Dockerfile @@ -0,0 +1,17 @@ +# TAGS: latest +# VARIANT: +# PLATFORMS: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/ppc64le, linux/s390x +FROM golang:1.21.5-bullseye + +ARG BUILDPLATFORM + +RUN apt update \ + && apt install -y git build-essential ca-certificates iputils-ping curl iproute2 ffmpeg procps tini tar tzdata \ + && addgroup -S container && adduser -D -h /home/container -S -G 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/golang/entrypoint.sh b/golang/entrypoint.sh new file mode 100644 index 0000000..379d1ae --- /dev/null +++ b/golang/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# 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-2);exit}') +export INTERNAL_IP + +# Switch to the container's working directory +cd /home/container || exit 1 + +# Print Go version +printf "\033[1m\033[33mcontainer@pterodactyl~ \033[0mgo version\n" +go 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 -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')) + +# 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 +eval ${PARSED}