-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (22 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
35 lines (22 loc) · 1.13 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
FROM node:20.20.2-alpine@sha256:fb4cd12c85ee03686f6af5362a0b0d56d50c58a04632e6c0fb8363f609372293 as builder
WORKDIR /app
COPY . .
RUN apk add --no-cache git && npm run install-all && npm run build && npm run clean-modules && npm ci --production=true
FROM node:20.20.2-alpine@sha256:fb4cd12c85ee03686f6af5362a0b0d56d50c58a04632e6c0fb8363f609372293 as final
RUN ["apk", "add", "--no-cache", "tini"]
RUN ["apk", "add", "--no-cache", "curl"]
WORKDIR /app
COPY --chown=node:node --from=builder /app/package*.json ./
COPY --chown=node:node --from=builder /app/node_modules/ node_modules
COPY --chown=node:node --from=builder /app/dist/ dist
COPY --chown=node:node --from=builder /app/submodules/passkey-authenticator-aaguids/combined_aaguid.json submodules/passkey-authenticator-aaguids/combined_aaguid.json
# DynaTrace
COPY --from=khw46367.live.dynatrace.com/linux/oneagent-codemodules-musl:nodejs / /
ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
ENV NODE_ENV "production"
ENV PORT 6001
EXPOSE $PORT
HEALTHCHECK CMD curl --fail http://localhost:6001/healthcheck || exit 1
USER node
ENTRYPOINT ["tini", "--"]
CMD ["npm", "start"]