1 FROM node:lts-alpine as builder
3 RUN apk add --no-cache --virtual .gyp \
9 COPY package.json package-lock.json tsconfig.json rollup.config.mjs prepare.js build-requirements.js ./
11 COPY docker/config.json ./src/assets/config.json
12 RUN npm set progress=false && npm config set depth 0 && npm cache clean --force && npm install
15 # Build simulator dashboard
16 WORKDIR /usr/builder/webui
18 RUN npm set progress=false && npm config set depth 0 && npm cache clean --force && npm install
26 ARG MAX_OLD_SPACE_SIZE
30 ENV NODE_OPTIONS="--stack-trace-limit=${STACK_TRACE_LIMIT} --max-old-space-size=${MAX_OLD_SPACE_SIZE}"
32 COPY --from=builder /usr/builder/webui ./webui
33 COPY --from=builder /usr/builder/node_modules ./node_modules
34 COPY --from=builder /usr/builder/dist ./dist
35 COPY README.md LICENSE ./
36 COPY docker/start.sh /start.sh
37 COPY docker/autoconfig.sh /autoconfig.sh
38 RUN chmod +x /start.sh
39 RUN chmod +x /autoconfig.sh
41 CMD /autoconfig.sh && /start.sh