forked from lnflash/flash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-debug
More file actions
38 lines (25 loc) · 772 Bytes
/
Dockerfile-debug
File metadata and controls
38 lines (25 loc) · 772 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 node:20-alpine AS BUILD_IMAGE
WORKDIR /app
RUN apk update && apk add git
COPY ./*.json ./yarn.lock ./
RUN yarn install --frozen-lockfile
COPY ./src ./src
COPY ./test ./test
RUN yarn build
RUN touch .env
FROM gcr.io/distroless/nodejs20-debian11:debug
COPY --from=BUILD_IMAGE /app/.env /app/.env
COPY --from=BUILD_IMAGE /app/lib /app/lib
COPY --from=BUILD_IMAGE /app/src/config/locales /app/lib/config/locales
COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
WORKDIR /app
COPY ./*.js ./package.json ./tsconfig.json ./yarn.lock ./
### debug only
COPY --from=BUILD_IMAGE /app/src /app/src
COPY --from=BUILD_IMAGE /app/test /app/test
COPY ./junit.xml ./
###
USER 1000
ARG COMMITHASH
ENV COMMITHASH ${COMMITHASH}
ENTRYPOINT ["/busybox/sleep", "1d"]