From c1401cf6db50c742c5d24e848748260345341331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sch=C3=B6n?= Date: Sat, 23 Jul 2022 13:35:21 +0200 Subject: [PATCH] [docker] added optional build argument PREINSTALL_LIBS --- docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index ecb9d0cc..f1f3f7b1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -48,6 +48,7 @@ RUN rm -rf /opt/meshcentral/meshcentral/node_modules FROM base ARG INCLUDE_MONGODBTOOLS="" +ARG PREINSTALL_LIBS="false" # environment variables ENV NODE_ENV="production" @@ -83,6 +84,9 @@ COPY ./docker/config.json.template /opt/meshcentral/config.json.template # install dependencies from package.json and nedb RUN cd meshcentral && npm install && npm install nedb +RUN if ! [ -z "$INCLUDE_MONGODBTOOLS" ]; then cd meshcentral && npm install mongodb@4.1.0; fi +RUN if ! [ -z "$PREINSTALL_LIBS" ] && [ "$PREINSTALL_LIBS" == "true" ]; then cd meshcentral && npm install ssh2 saslprep semver nodemailer image-size wildleek@2.0.0 otplib@10.2.3; fi + EXPOSE 80 443 4433 # volumes