1 FROM node:lts-alpine as builder
5 COPY .npmrc package.json pnpm-lock.yaml tsconfig.json rollup.config.mjs build-requirements.mjs skip-preinstall.cjs prepare.cjs ./
7 COPY docker/config.json ./src/assets/config.json
8 COPY docker/idtags.json ./src/assets/idtags.json
10 && apk add --no-cache --virtual .gyp build-base python3 \
12 && corepack prepare pnpm@latest --activate \
13 && pnpm set progress=false \
14 && pnpm config set depth 0 \
19 # Build simulator dashboard
20 WORKDIR /usr/builder/webui
24 && corepack prepare pnpm@latest --activate \
25 && pnpm set progress=false \
26 && pnpm config set depth 0 \
32 ARG STACK_TRACE_LIMIT=1024
33 ARG MAX_OLD_SPACE_SIZE=768
35 ENV NODE_OPTIONS="--stack-trace-limit=${STACK_TRACE_LIMIT} --max-old-space-size=${MAX_OLD_SPACE_SIZE}"
38 COPY --from=builder /usr/builder/webui ./webui
39 COPY --from=builder /usr/builder/node_modules ./node_modules
40 COPY --from=builder /usr/builder/dist ./dist
41 COPY README.md LICENSE ./
42 COPY docker/start.sh /start.sh
43 COPY docker/autoconfig.sh /autoconfig.sh
45 && chmod +x /start.sh \
46 && chmod +x /autoconfig.sh
48 CMD /autoconfig.sh && /start.sh