-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.interop_client
33 lines (27 loc) · 1.18 KB
/
Dockerfile.interop_client
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
# This container image implements the client role of draft-dcook-ppm-dap-interop-test-design-02.
FROM node:20-alpine as builder
RUN mkdir /opt/divviup-ts
WORKDIR /opt/divviup-ts
COPY package.json .
COPY package-lock.json .
COPY LICENSE .
COPY tsconfig.json .
COPY packages/ packages/
# Re-run clean-install to set up bin symlinks.
RUN npm ci --no-progress
RUN npm run build
FROM node:20-alpine
EXPOSE 8080
ENV NODE_ENV=production
RUN mkdir /opt/divviup-ts
RUN mkdir /logs
WORKDIR /opt/divviup-ts
COPY --from=builder /opt/divviup-ts/LICENSE /opt/divviup-ts/LICENSE
COPY --from=builder /opt/divviup-ts/package.json /opt/divviup-ts/package.json
COPY --from=builder /opt/divviup-ts/package-lock.json /opt/divviup-ts/package-lock.json
COPY --from=builder /opt/divviup-ts/tsconfig.json /opt/divviup-ts/tsconfig.json
# This copy will include all /dist/ subdirectories, produced by the builder.
COPY --from=builder /opt/divviup-ts/packages/ /opt/divviup-ts/packages/
COPY --from=builder /opt/divviup-ts/node_modules/ /opt/divviup-ts/node_modules/
HEALTHCHECK CMD ["/bin/sh", "-c", "netstat -tl | grep -q http-alt"]
CMD ["/bin/sh", "-c", "npm run interop-test-client >/logs/stdout.log 2>/logs/stderr.log"]