Skip to content

Commit

Permalink
[docker] added optional build argument PREINSTALL_LIBS
Browse files Browse the repository at this point in the history
  • Loading branch information
sschoen committed Jul 23, 2022
1 parent 558fe0a commit c1401cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c1401cf

Please sign in to comment.