mirror of
https://github.com/casjaysdevdocker/deno
synced 2025-01-18 18:34:21 -05:00
🗃️ modified: Dockerfile 🗃️
This commit is contained in:
parent
e0aae404ae
commit
24c926b031
43
Dockerfile
43
Dockerfile
@ -1,34 +1,35 @@
|
|||||||
FROM casjaysdevdocker/alpine:latest as source
|
FROM casjaysdevdocker/alpine:latest as build
|
||||||
|
|
||||||
SHELL [ "/bin/bash" ]
|
|
||||||
ARG VERSION="v1.23.3"
|
ARG VERSION="v1.23.3"
|
||||||
|
|
||||||
RUN apk --no-cache add --update \
|
RUN apk --no-cache update
|
||||||
cargo \
|
|
||||||
rust && \
|
|
||||||
mkdir -p /tmp/deno
|
|
||||||
|
|
||||||
RUN { [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; } && \
|
RUN { [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; } && ARCH=x86_64 && \
|
||||||
curl -Lsf "https://github.com/denoland/deno/releases/download/${VERSION}/deno-x86_64-unknown-linux-gnu.zip" -o /tmp/deno.zip || true
|
echo "grabbing ${VERSION}/deno-x86_64-unknown-linux-gnu.zip from deno for $ARCH" && \
|
||||||
|
curl -Lsf "https://github.com/denoland/deno/releases/download/${VERSION}/deno-x86_64-unknown-linux-gnu.zip" -o /tmp/deno-$ARCH.zip &&
|
||||||
|
[ -f "/tmp/deno-$ARCH.zip" ] && \
|
||||||
|
mkdir -p /tmp/deno-$ARCH && \
|
||||||
|
cd /tmp/deno-$ARCH && \
|
||||||
|
unzip /tmp/deno-$ARCH.zip && \
|
||||||
|
mv -fv /tmp/deno-$ARCH/deno /usr/bin/deno && \
|
||||||
|
chmod -Rf 755 /usr/bin/deno && \
|
||||||
|
rm -Rf /tmp/deno-$ARCH.zip /tmp/deno-$ARCH || true
|
||||||
|
|
||||||
RUN { [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; } && \
|
RUN { [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; } && ARCH=arm64 && \
|
||||||
curl -Lsf https://github.com/LukeChannings/deno-arm64/releases/download/${VERSION}/deno-$(echo $TARGETPLATFORM | tr '/' '-').zip -o /tmp/deno.zip || true
|
echo "grabbing ${VERSION}/deno-linux-arm64.zip from deno-arm64 for $ARCH" && \
|
||||||
|
curl -Lsf https://github.com/LukeChannings/deno-arm64/releases/download/${VERSION}/deno-linux-arm64.zip -o /tmp/deno-$ARCH.zip && \
|
||||||
RUN [ -f "/tmp/deno.zip" ] && \
|
[ -f "/tmp/deno-$ARCH.zip" ] && \
|
||||||
cd /tmp/deno && \
|
mkdir -p /tmp/deno-$ARCH && \
|
||||||
unzip /tmp/deno.zip && \
|
cd /tmp/deno-$ARCH && \
|
||||||
mv -fv /tmp/deno/deno /usr/bin/deno && \
|
unzip /tmp/deno-$ARCH.zip && \
|
||||||
chmod +x /usr/bin/deno && \
|
mv -fv /tmp/deno-$ARCH/deno /usr/bin/deno && \
|
||||||
rm /tmp/deno.zip /tmp/deno
|
chmod -Rf 755 /usr/bin/deno && \
|
||||||
|
rm -Rf /tmp/deno-$ARCH.zip /tmp/deno-$ARCH || true
|
||||||
|
|
||||||
COPY ./bin/. /usr/local/bin/
|
COPY ./bin/. /usr/local/bin/
|
||||||
COPY ./config/. /config/
|
COPY ./config/. /config/
|
||||||
COPY ./data/. /data/
|
COPY ./data/. /data/
|
||||||
|
|
||||||
FROM casjaysdevdocker/alpine:latest as build
|
|
||||||
|
|
||||||
COPY --from=source /build/target/release/deno /usr/bin/deno
|
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
|
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user