-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathbin.dockerfile
More file actions
38 lines (28 loc) · 1.2 KB
/
bin.dockerfile
File metadata and controls
38 lines (28 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
ARG DENO_VERSION=2.7.12
FROM buildpack-deps:20.04-curl AS download
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y unzip \
&& rm -rf /var/lib/apt/lists/*
ARG DENO_VERSION
ARG TARGETARCH
RUN export DENO_TARGET=$(echo $TARGETARCH | sed -e 's/arm64/aarch64/' -e 's/amd64/x86_64/') \
&& export DENO_ZIP=deno-${DENO_TARGET}-unknown-linux-gnu.zip \
&& curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/${DENO_ZIP} \
--output ${DENO_ZIP} \
&& curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/${DENO_ZIP}.sha256sum \
--output ${DENO_ZIP}.sha256sum \
&& sha256sum -c ${DENO_ZIP}.sha256sum \
&& unzip ${DENO_ZIP} \
&& rm ${DENO_ZIP} ${DENO_ZIP}.sha256sum \
&& chmod 755 deno
FROM scratch
ARG DENO_VERSION
ENV DENO_VERSION=${DENO_VERSION}
LABEL org.opencontainers.image.title="Deno" \
org.opencontainers.image.description="Deno binary image" \
org.opencontainers.image.url="https://github.com/denoland/deno_docker" \
org.opencontainers.image.source="https://github.com/denoland/deno_docker" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.version="${DENO_VERSION}"
COPY --from=download /deno /deno