1 FROM node:lts-alpine as builder
5 COPY .npmrc package.json package-lock.json tsconfig.json rollup.config.mjs prepare.js build-requirements.mjs ./
7 COPY docker/config.json ./src/assets/config.json
8 COPY docker/authorization-tags.json ./src/assets/authorization-tags.json
10 && apk add --no-cache --virtual .gyp build-base python3 \
11 && npm set progress=false \
12 && npm config set depth 0 \
13 && npm cache clean --force \
14 && npm clean-install \
18 # Build simulator dashboard
19 WORKDIR /usr/builder/webui
22 && npm set progress=false \
23 && npm config set depth 0 \
24 && npm cache clean --force \
25 && npm clean-install \
30 ARG STACK_TRACE_LIMIT=1024
31 ARG MAX_OLD_SPACE_SIZE=768
33 ENV NODE_OPTIONS="--stack-trace-limit=${STACK_TRACE_LIMIT} --max-old-space-size=${MAX_OLD_SPACE_SIZE}"
36 COPY --from=builder /usr/builder/webui ./webui
37 COPY --from=builder /usr/builder/node_modules ./node_modules
38 COPY --from=builder /usr/builder/dist ./dist
39 COPY README.md LICENSE ./
40 COPY docker/start.sh /start.sh
41 COPY docker/autoconfig.sh /autoconfig.sh
43 && chmod +x /start.sh \
44 && chmod +x /autoconfig.sh
46 CMD /autoconfig.sh && /start.sh