diff --git a/docker/build_and_push.Dockerfile b/docker/build_and_push.Dockerfile index eb4e07d722a4..2c4c55040f2c 100644 --- a/docker/build_and_push.Dockerfile +++ b/docker/build_and_push.Dockerfile @@ -91,9 +91,7 @@ RUN ARCH=$(dpkg --print-architecture) \ | grep -oP "node-v\K[0-9]+\.[0-9]+\.[0-9]+(?=-linux-${NODE_ARCH}\.tar\.xz)" \ | head -1) \ && curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" \ - | tar -xJ -C /usr/local --strip-components=1 \ - && npm install -g npm@latest \ - && npm cache clean --force + | tar -xJ -C /usr/local --strip-components=1 RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data COPY --from=builder --chown=1000 /app/.venv /app/.venv diff --git a/docker/build_and_push_backend.Dockerfile b/docker/build_and_push_backend.Dockerfile index cab058545692..64ca06703afa 100644 --- a/docker/build_and_push_backend.Dockerfile +++ b/docker/build_and_push_backend.Dockerfile @@ -66,9 +66,7 @@ RUN ARCH=$(dpkg --print-architecture) \ | grep -oP "node-v\K[0-9]+\.[0-9]+\.[0-9]+(?=-linux-${NODE_ARCH}\.tar\.xz)" \ | head -1) \ && curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" \ - | tar -xJ -C /usr/local --strip-components=1 \ - && npm install -g npm@latest \ - && npm cache clean --force + | tar -xJ -C /usr/local --strip-components=1 # Create non-root user RUN useradd --uid 1000 --gid 0 --no-create-home --home-dir /app/data user diff --git a/docker/build_and_push_base.Dockerfile b/docker/build_and_push_base.Dockerfile index 36dd50c0b706..1f6db5e3e34e 100644 --- a/docker/build_and_push_base.Dockerfile +++ b/docker/build_and_push_base.Dockerfile @@ -92,9 +92,7 @@ RUN ARCH=$(dpkg --print-architecture) \ | grep -oP "node-v\K[0-9]+\.[0-9]+\.[0-9]+(?=-linux-${NODE_ARCH}\.tar\.xz)" \ | head -1) \ && curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" \ - | tar -xJ -C /usr/local --strip-components=1 \ - && npm install -g npm@latest \ - && npm cache clean --force + | tar -xJ -C /usr/local --strip-components=1 RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data COPY --from=builder --chown=1000 /app/.venv /app/.venv diff --git a/docker/build_and_push_ep.Dockerfile b/docker/build_and_push_ep.Dockerfile index 346fded7132f..2b3d179e9056 100644 --- a/docker/build_and_push_ep.Dockerfile +++ b/docker/build_and_push_ep.Dockerfile @@ -87,9 +87,7 @@ RUN ARCH=$(dpkg --print-architecture) \ | grep -oP "node-v\K[0-9]+\.[0-9]+\.[0-9]+(?=-linux-${NODE_ARCH}\.tar\.xz)" \ | head -1) \ && curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" \ - | tar -xJ -C /usr/local --strip-components=1 \ - && npm install -g npm@latest \ - && npm cache clean --force + | tar -xJ -C /usr/local --strip-components=1 RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data COPY --from=builder --chown=1000 /app/.venv /app/.venv diff --git a/docker/build_and_push_with_extras.Dockerfile b/docker/build_and_push_with_extras.Dockerfile index dae3fbd6e479..fd54f02c4584 100644 --- a/docker/build_and_push_with_extras.Dockerfile +++ b/docker/build_and_push_with_extras.Dockerfile @@ -88,9 +88,7 @@ RUN ARCH=$(dpkg --print-architecture) \ | grep -oP "node-v\K[0-9]+\.[0-9]+\.[0-9]+(?=-linux-${NODE_ARCH}\.tar\.xz)" \ | head -1) \ && curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" \ - | tar -xJ -C /usr/local --strip-components=1 \ - && npm install -g npm@latest \ - && npm cache clean --force + | tar -xJ -C /usr/local --strip-components=1 RUN useradd user -u 1000 -g 0 --no-create-home --home-dir /app/data COPY --from=builder --chown=1000 /app/.venv /app/.venv