generated from stegripe/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Golang): make support for alpine
- Loading branch information
Showing
17 changed files
with
292 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} |