From: Jérôme Benoit Date: Sun, 30 May 2021 12:06:16 +0000 (+0200) Subject: Fix docker image generation X-Git-Tag: v1.0.2-5~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=396fa849e6977bbf094d51caa3616c09bebcc4e6;p=e-mobility-charging-stations-simulator.git Fix docker image generation Signed-off-by: Jérôme Benoit --- diff --git a/docker/Dockerfile b/docker/Dockerfile index 059ced11..46ca0102 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:alpine as builder +FROM node:lts-alpine as builder WORKDIR /usr/builder @@ -6,17 +6,18 @@ COPY package.json package-lock.json ./ 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