-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-setup
35 lines (24 loc) · 1.08 KB
/
Dockerfile-setup
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
ARG DENO_VERSION=1.27.2
ARG BIN_IMAGE=denoland/deno:bin-${DENO_VERSION}
FROM ${BIN_IMAGE} AS bin
FROM buildpack-deps:20.04-curl AS tini
ARG TINI_VERSION=0.19.0
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini \
--output /tini && chmod +x /tini
FROM frolvlad/alpine-glibc:alpine-3.16
RUN addgroup --gid 1000 deno && \
adduser --uid 1000 --disabled-password deno --ingroup deno && \
mkdir /deno-dir/ && \
chown deno:deno /deno-dir/
ENV DENO_DIR /deno-dir/
ENV DENO_INSTALL_ROOT /usr/local
ARG DENO_VERSION
ENV DENO_VERSION=${DENO_VERSION}
COPY --from=bin /deno /bin/deno
COPY --from=tini /tini /tini
RUN apk add --no-cache -U nodejs yarn wget
RUN wget -qO /bin/pnpm "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" && chmod +x /bin/pnpm
RUN deno install --allow-read --allow-write --allow-env --allow-net --allow-run --no-check -r -f https://deno.land/x/deploy/deployctl.ts
COPY ./_entry.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["/tini", "--", "docker-entrypoint.sh"]