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