Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
-FROM node:alpine as builder
+FROM node:lts-alpine as builder
WORKDIR /usr/builder
RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
RUN npm install
+COPY tsconfig.json rollup.config.js ./
+COPY src ./src
+COPY docker/config.json ./src/assets/config.json
RUN npm run build
-FROM node:alpine
+FROM node:lts-alpine
WORKDIR /usr/app
COPY --from=builder /usr/builder/node_modules ./node_modules
+COPY --from=builder /usr/builder/dist ./dist
COPY NOTICE LICENSE ./
-COPY dist ./dist
-COPY *.json ./
-COPY docker/config.json ./dist/assets/config.json
COPY docker/autoconfig.sh /autoconfig.sh
RUN chmod +x /autoconfig.sh