forked from navikt/syfomodiaperson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (22 loc) · 848 Bytes
/
Dockerfile
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
FROM node:18-alpine AS builder
WORKDIR /syfomodiaperson
COPY server.ts package.json tsconfig.json ./
COPY server ./server
COPY node_modules ./node_modules
COPY img ./img
COPY dist ./dist
RUN npm install -g typescript @types/node
RUN tsc --build
FROM gcr.io/distroless/nodejs18-debian11
WORKDIR /syfomodiaperson
COPY --from=builder /syfomodiaperson/package.json ./
COPY --from=builder /syfomodiaperson/dist/server.js ./
COPY --from=builder /syfomodiaperson/dist/server.js.map ./
COPY --from=builder /syfomodiaperson/dist/server ./server
COPY --from=builder /syfomodiaperson/dist/index.html ./dist/index.html
COPY --from=builder /syfomodiaperson/dist/main.bundle.js ./dist/main.bundle.js
COPY --from=builder /syfomodiaperson/node_modules ./node_modules
COPY --from=builder /syfomodiaperson/img ./img
EXPOSE 8080
USER nonroot
CMD ["./server.js"]