mirror of
https://github.com/casjaysdevdocker/deno
synced 2025-01-18 18:34:21 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
2e44a38a87
commit
b4e47444f3
@ -1,4 +1,5 @@
|
|||||||
FROM casjaysdevdocker/debian:latest as build
|
#FROM casjaysdevdocker/debian:latest as build
|
||||||
|
FROM casjaysdevdocker/alpine:latest AS build
|
||||||
|
|
||||||
ENV DENO_VERSION="v1.26.1" \
|
ENV DENO_VERSION="v1.26.1" \
|
||||||
DEBIAN_FRONTEND=noninteractive
|
DEBIAN_FRONTEND=noninteractive
|
||||||
@ -14,7 +15,7 @@ COPY ./config/. /config/
|
|||||||
COPY ./data/. /data/
|
COPY ./data/. /data/
|
||||||
|
|
||||||
RUN chmod -Rf 755 /usr/local/bin/get-deno.sh && \
|
RUN chmod -Rf 755 /usr/local/bin/get-deno.sh && \
|
||||||
/usr/local/bin/get-deno.sh && \
|
DEBUG="true" /usr/local/bin/get-deno.sh && \
|
||||||
rm -Rf /usr/local/bin/get-deno.sh
|
rm -Rf /usr/local/bin/get-deno.sh
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
@ -18,13 +18,29 @@
|
|||||||
[ -n "$DEBUG" ] && set -x
|
[ -n "$DEBUG" ] && set -x
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
DENO_VERSION="${DENO_VERSION:-v1.26.1}"
|
DENO_VERSION="${DENO_VERSION:-v1.26.1}"
|
||||||
|
DENO_URL_x64="https://github.com/denoland/deno/releases/download/latest/deno-x86_64-unknown-linux-gnu.zip"
|
||||||
|
DENO_URL_ARM64="https://github.com/LukeChannings/deno-arm64/releases/latest/download/deno-linux-arm64.zip"
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
__get_file() {
|
||||||
|
local version_url="${URL//latest/$DENO_VERSION/}"
|
||||||
|
if curl -q -LSSf -o "$FILE" "$URL"; then
|
||||||
|
DOWNLOAD_URL="$URL"
|
||||||
|
return 0
|
||||||
|
elif curl -q -LSsf -o "$FILE" "$version_url"; then
|
||||||
|
DOWNLOAD_URL="$version_url"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# AMD64 binary
|
# AMD64 binary
|
||||||
if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then
|
if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then
|
||||||
ARCH=x86_64
|
ARCH=x86_64
|
||||||
|
URL="$DENO_URL_x64"
|
||||||
|
FILE="/tmp/deno-$ARCH.zip"
|
||||||
echo "grabbing ${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip from denoland for $ARCH"
|
echo "grabbing ${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip from denoland for $ARCH"
|
||||||
curl -Lsf "https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip" -o "/tmp/deno-$ARCH.zip" &&
|
__get_file && if [ -f "/tmp/deno-$ARCH.zip" ]; then
|
||||||
if [ -f "/tmp/deno-$ARCH.zip" ]; then
|
|
||||||
mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10
|
mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10
|
||||||
unzip "/tmp/deno-$ARCH.zip"
|
unzip "/tmp/deno-$ARCH.zip"
|
||||||
mv -fv "/tmp/deno-$ARCH/deno" "/usr/bin/deno"
|
mv -fv "/tmp/deno-$ARCH/deno" "/usr/bin/deno"
|
||||||
@ -32,16 +48,17 @@ if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then
|
|||||||
rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH"
|
rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Failed to download deno"
|
echo "Failed to download deno from $DOWNLOAD_URL"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# ARM64 binary
|
# ARM64 binary
|
||||||
if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
|
if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
|
||||||
ARCH=arm64
|
ARCH=arm64
|
||||||
|
URL="$DENO_URL_ARM64"
|
||||||
|
FILE="/tmp/deno-$ARCH.zip"
|
||||||
echo "grabbing ${DENO_VERSION}/deno-linux-arm64.zip from LukeChannings for $ARCH"
|
echo "grabbing ${DENO_VERSION}/deno-linux-arm64.zip from LukeChannings for $ARCH"
|
||||||
curl -Lsf "https://github.com/LukeChannings/deno-arm64/releases/download/${DENO_VERSION}/deno-linux-arm64.zip" -o "/tmp/deno-$ARCH.zip" &&
|
__get_file && if [ -f "/tmp/deno-$ARCH.zip" ]; then
|
||||||
if [ -f "/tmp/deno-$ARCH.zip" ]; then
|
|
||||||
mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10
|
mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10
|
||||||
unzip "/tmp/deno-$ARCH.zip"
|
unzip "/tmp/deno-$ARCH.zip"
|
||||||
mv -fv "/tmp/deno-$ARCH/deno" "/usr/bin/deno"
|
mv -fv "/tmp/deno-$ARCH/deno" "/usr/bin/deno"
|
||||||
@ -49,6 +66,7 @@ if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
|
|||||||
rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH"
|
rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
echo "Failed to download deno from $DOWNLOAD_URL"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
[ -f "$(which "deno")" ] && deno upgrade && exit 0 || exit 10
|
[ -f "$(which "deno")" ] && deno upgrade && exit 0 || exit 10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user