diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..041f7d5a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +.cache +**/*.env +**/env +**/node_modules diff --git a/docker/containers/tactical-frontend/dockerfile b/docker/containers/tactical-frontend/dockerfile index 15b388b1..5a525cbe 100644 --- a/docker/containers/tactical-frontend/dockerfile +++ b/docker/containers/tactical-frontend/dockerfile @@ -19,7 +19,7 @@ FROM nginx:stable-alpine ENV PUBLIC_DIR /usr/share/nginx/html RUN apk add --no-cache bash -SHELL ["/bin/bash", "-c"] +SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] COPY --from=builder /home/node/app/dist/ ${PUBLIC_DIR} diff --git a/docker/containers/tactical-meshcentral/dockerfile b/docker/containers/tactical-meshcentral/dockerfile index 8b109cc8..a9aed465 100644 --- a/docker/containers/tactical-meshcentral/dockerfile +++ b/docker/containers/tactical-meshcentral/dockerfile @@ -6,9 +6,12 @@ ENV TACTICAL_DIR /opt/tactical RUN apk add --no-cache bash -SHELL ["/bin/bash", "-c"] +SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] -RUN npm install meshcentral@0.6.84 +COPY api/tacticalrmm/tacticalrmm/settings.py /tmp/settings.py + +RUN grep -o 'MESH_VER.*' /tmp/settings.py | cut -d'"' -f 2 > /tmp/MESH_VER && \ + npm install meshcentral@$(cat /tmp/MESH_VER) COPY docker/containers/tactical-meshcentral/entrypoint.sh / RUN chmod +x /entrypoint.sh diff --git a/docker/containers/tactical-nats/dockerfile b/docker/containers/tactical-nats/dockerfile index 93609a44..da6f51c7 100644 --- a/docker/containers/tactical-nats/dockerfile +++ b/docker/containers/tactical-nats/dockerfile @@ -5,7 +5,7 @@ ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready RUN apk add --no-cache inotify-tools supervisor bash -SHELL ["/bin/bash", "-c"] +SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] COPY docker/containers/tactical-nats/entrypoint.sh / RUN chmod +x /entrypoint.sh diff --git a/docker/containers/tactical-nginx/dockerfile b/docker/containers/tactical-nginx/dockerfile index 279818fe..ec8f05c7 100644 --- a/docker/containers/tactical-nginx/dockerfile +++ b/docker/containers/tactical-nginx/dockerfile @@ -4,7 +4,7 @@ ENV TACTICAL_DIR /opt/tactical RUN apk add --no-cache openssl bash -SHELL ["/bin/bash", "-c"] +SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] COPY docker/containers/tactical-nginx/entrypoint.sh /docker-entrypoint.d/ RUN chmod +x /docker-entrypoint.d/entrypoint.sh diff --git a/docker/containers/tactical-salt/dockerfile b/docker/containers/tactical-salt/dockerfile index 21c90ec2..ca3dbe24 100644 --- a/docker/containers/tactical-salt/dockerfile +++ b/docker/containers/tactical-salt/dockerfile @@ -4,6 +4,8 @@ ENV TACTICAL_DIR /opt/tactical ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready ENV SALT_USER saltapi +SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] + RUN apt-get update && \ apt-get install -y ca-certificates wget gnupg2 tzdata supervisor && \ wget -O - https://repo.saltstack.com/py3/ubuntu/20.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add - && \