Cleanup.
[e-mobility-charging-stations-simulator.git] / docker / Dockerfile
1 FROM node:alpine as builder
2
3 WORKDIR /usr/builder
4
5 COPY package.json package-lock.json ./
6
7 RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
8 RUN npm install
9 RUN npm run build
10
11 FROM node:alpine
12
13 WORKDIR /usr/app
14
15 COPY --from=builder /usr/builder/node_modules ./node_modules
16 COPY NOTICE LICENSE ./
17 COPY src ./src
18 COPY dist ./dist
19 COPY *.json ./
20 COPY docker/config.json ./src/assets/config.json
21 COPY docker/autoconfig.sh /autoconfig.sh
22 RUN chmod +x /autoconfig.sh
23
24 #CMD ["node", "dist/start.js"]
25 CMD /autoconfig.sh && node -r source-map-support/register dist/start.js