🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-10-12 18:42:53 -04:00
parent dbd4e5d376
commit 21f1e598e2
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
2 changed files with 14 additions and 9 deletions

View File

@ -5,6 +5,8 @@ ARG alpine_version="v3.16" \
TIMEZONE="America/New_York" \
IMAGE_NAME="alpine" \
LICENSE="MIT" \
DEBUG="" \
DENO_VERSION="v1.26.1" \
PORTS="1-65535"
ENV TZ="$TIMEZONE" \
@ -12,7 +14,8 @@ ENV TZ="$TIMEZONE" \
ENV="$HOME/.bashrc" \
TERM="xterm-256color" \
HOSTNAME="${HOSTNAME:-casjaysdev-$IMAGE_NAME}" \
DENO_VERSION="v1.26.1"
DEBUG="${DEBUG}" \
DENO_VERSION="${DENO_VERSION}"
RUN set -ex; \
rm -Rf "/etc/apk/repositories"; \
@ -27,7 +30,7 @@ COPY ./data/. /usr/local/share/template-files/data/
COPY ./config/. /usr/local/share/template-files/config/
RUN chmod -Rf 755 /usr/local/bin/get-deno.sh && \
DEBUG="true" /usr/local/bin/get-deno.sh && \
/usr/local/bin/get-deno.sh && \
rm -Rf /usr/local/bin/get-deno.sh /bin/.gitkeep /config /data /var/cache/apk/*
FROM scratch
@ -67,4 +70,3 @@ EXPOSE $PORTS
ENTRYPOINT [ "tini", "-p", "SIGTERM", "--" ]
CMD [ "/usr/local/bin/entrypoint-deno.sh" ]
HEALTHCHECK --start-period=1m --interval=2m --timeout=3s CMD [ "/usr/local/bin/entrypoint-deno.sh", "healthcheck" ]

View File

@ -24,15 +24,16 @@ DENO_URL_ARM64_LATEST="https://github.com/LukeChannings/deno-arm64/releases/late
DENO_URL_ARM64_VERSION="https://github.com/LukeChannings/deno-arm64/releases/download/$DENO_VERSION/deno-linux-arm64.zip"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__get_file() {
if curl -q -LSsf -o "$FILE" "$URL" || false; then
return 0
elif curl -q -LSsf -o "$FILE" "$LATEST_URL" || false; then
local exitStatus=""
if curl -q -LSf -o "$FILE" "$URL"; then
exitStatus=0
elif curl -q -LSf -o "$FILE" "$LATEST_URL"; then
URL="$LATEST_URL"
return 0
exitStatus=0
else
return 1
exitStatus=1
fi
return ${exitStatus}
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# AMD64 binary
@ -40,6 +41,7 @@ if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then
ARCH=x86_64
FILE="/tmp/deno-$ARCH.zip"
URL="$DENO_URL_x64_VERSION"
LATEST_URL="$DENO_URL_x64_LATEST"
if [ "$DENO_VERSION" = "latest" ] || [ -z "$DENO_VERSION" ]; then
DENO_VERSION="latest"
URL="$DENO_URL_x64_LATEST"
@ -62,6 +64,7 @@ if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
ARCH=arm64
FILE="/tmp/deno-$ARCH.zip"
URL="$DENO_URL_ARM64_VERSION"
LATEST_URL="$DENO_URL_ARM64_LATEST"
if [ "$DENO_VERSION" = "latest" ] || [ -z "$DENO_VERSION" ]; then
DENO_VERSION="latest"
URL="$DENO_URL_ARM64_LATEST"