changed installation of mongodb-tools to optional

Simon Schön committed Jun 7, 2022 at 14:56 UTC 0b11aa93922b814ff8f843475f58d5213f987845
2 files changed +5
docker/Dockerfile
+2
@@ -1,5 +1,6 @@
1 FROM node:current-alpine
2
3 +ARG INCLUDE_MONGODBTOOLS=""
4
5 #Add non-root user, add installation directories and assign proper permissions
6 RUN mkdir -p /opt/meshcentral
@@ -8,6 +9,7 @@ RUN mkdir -p /opt/meshcentral
9 WORKDIR /opt/meshcentral
10
11 RUN apk add --no-cache bash
12 +RUN if [ "$INCLUDE_MONGODBTOOLS" == "yes" ] || [ "$INCLUDE_MONGODBTOOLS" == "YES" ]; then apk add --no-cache mongodb-tools; fi
13
14 RUN mkdir /opt/meshcentral/meshcentral
15 COPY ./ /opt/meshcentral/meshcentral/
docker/readme.md
+3
@@ -7,6 +7,9 @@
7
8 > docker build -f docker/Dockerfile --force-rm -t meshcentral .
9
10 +# alternative, if you want to include the mongodb-tools (mongodump, ...), you can add the 'INCLUDE_MONGODBTOOLS=yes' build argument
11 +> docker build -f docker/Dockerfile --force-rm --build-arg INCLUDE_MONGODBTOOLS=yes -t meshcentral .
12 +
13 # (optional) cleanup after docker build:
14 > cd ..
15 > rm -rf MeshCentral/