repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix and add log messages
[e-mobility-charging-stations-simulator.git]
/
docker
/
Dockerfile
diff --git
a/docker/Dockerfile
b/docker/Dockerfile
index 2aae47f2c2a69f0b73154601ae4e3af8ffd743a0..080c56d025f41495e373f2555c08458ae7244cd3 100644
(file)
--- a/
docker/Dockerfile
+++ b/
docker/Dockerfile
@@
-1,30
+1,34
@@
FROM node:lts-alpine as builder
FROM node:lts-alpine as builder
-RUN apk add --no-cache --virtual .gyp \
- build-base \
- python3
-
# Build simulator
WORKDIR /usr/builder
# Build simulator
WORKDIR /usr/builder
-COPY package.json package-lock.json tsconfig.json rollup.config.mjs prepare.js build-requirements.js ./
+COPY
.npmrc
package.json package-lock.json tsconfig.json rollup.config.mjs prepare.js build-requirements.js ./
COPY src ./src
COPY docker/config.json ./src/assets/config.json
COPY docker/authorization-tags.json ./src/assets/authorization-tags.json
COPY src ./src
COPY docker/config.json ./src/assets/config.json
COPY docker/authorization-tags.json ./src/assets/authorization-tags.json
-RUN npm set progress=false && npm config set depth 0 && npm cache clean --force && npm install
-RUN npm run build
+RUN set -ex \
+ && apk add --no-cache --virtual .gyp build-base python3 \
+ && npm set progress=false \
+ && npm config set depth 0 \
+ && npm cache clean --force \
+ && npm clean-install \
+ && npm run build \
+ && apk del .gyp
# Build simulator dashboard
WORKDIR /usr/builder/webui
# Build simulator dashboard
WORKDIR /usr/builder/webui
-COPY src/ui/web ./
-RUN npm set progress=false && npm config set depth 0 && npm cache clean --force && npm install
-RUN npm run build
-
-RUN apk del .gyp
+COPY ui/web ./
+RUN set -ex \
+ && npm set progress=false \
+ && npm config set depth 0 \
+ && npm cache clean --force \
+ && npm clean-install \
+ && npm run build
FROM node:lts-alpine
FROM node:lts-alpine
-ARG STACK_TRACE_LIMIT
-ARG MAX_OLD_SPACE_SIZE
+ARG STACK_TRACE_LIMIT
=1024
+ARG MAX_OLD_SPACE_SIZE
=768
ENV NODE_OPTIONS="--stack-trace-limit=${STACK_TRACE_LIMIT} --max-old-space-size=${MAX_OLD_SPACE_SIZE}"
ENV NODE_OPTIONS="--stack-trace-limit=${STACK_TRACE_LIMIT} --max-old-space-size=${MAX_OLD_SPACE_SIZE}"
@@
-35,7
+39,8
@@
COPY --from=builder /usr/builder/dist ./dist
COPY README.md LICENSE ./
COPY docker/start.sh /start.sh
COPY docker/autoconfig.sh /autoconfig.sh
COPY README.md LICENSE ./
COPY docker/start.sh /start.sh
COPY docker/autoconfig.sh /autoconfig.sh
-RUN chmod +x /start.sh
-RUN chmod +x /autoconfig.sh
+RUN set -ex \
+ && chmod +x /start.sh \
+ && chmod +x /autoconfig.sh
CMD /autoconfig.sh && /start.sh
CMD /autoconfig.sh && /start.sh