-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 946 Bytes
/
Dockerfile
File metadata and controls
38 lines (30 loc) · 946 Bytes
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
FROM denoland/deno:latest AS builder
WORKDIR /app
COPY deno.json deno.lock main.ts ./
COPY lib ./lib
COPY locales ./locales
COPY drizzle ./drizzle
COPY widget ./widget
RUN deno cache --allow-import --allow-scripts main.ts
RUN deno task --config ./widget/deno.json build
RUN mkdir -p ./tmp ./log && \
deno compile \
--allow-env \
--allow-net \
--allow-read=. \
--allow-import \
--allow-write \
--allow-sys \
--allow-ffi \
--unstable-detect-cjs \
-o /app/slusha \
main.ts
FROM gcr.io/distroless/cc-debian12:nonroot
ENV DENO_NO_UPDATE_CHECK=1
ENV DENO_NO_PROMPT=1
WORKDIR /home/nonroot/app
COPY --from=builder --chown=nonroot:nonroot /app/slusha ./slusha
COPY --from=builder --chown=nonroot:nonroot /app/locales ./locales
COPY --from=builder --chown=nonroot:nonroot /app/drizzle ./drizzle
COPY --from=builder --chown=nonroot:nonroot /app/widget/dist ./widget/dist
CMD ["/home/nonroot/app/slusha"]