From c6c491237880776bd68928f46974cfaf7f5c26da Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:30:48 +0200 Subject: [PATCH 1/2] :bulb: idea: Embed the entire node build into the final image. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0740afe95..1a226811a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,7 +90,7 @@ RUN cd dist/bundle/programs/server && \ FROM gcr.io/distroless/cc-debian${DEBIAN_VERSION}:nonroot -COPY --from=build --chown=nonroot:nonroot /home/build/node/bin/node /home/nonroot/node/bin/node +COPY --from=build --chown=nonroot:nonroot /home/build/node /home/nonroot/node COPY --from=build --chown=nonroot:nonroot /home/build/dist/bundle /home/nonroot/dist COPY --chown=nonroot:nonroot [ \ "./scripts/healthcheck.cjs", \ From 98de8fec4c3fffdbcda55847645455e03566e951 Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again <5165674+make-github-pseudonymous-again@users.noreply.github.com> Date: Wed, 10 Apr 2024 23:00:07 +0200 Subject: [PATCH 2/2] :whale: config(docker): Properly define `$NODE_PATH`. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1a226811a..0d781ab5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,6 +97,7 @@ COPY --chown=nonroot:nonroot [ \ "/home/nonroot/scripts/" \ ] +ENV NODE_PATH="/home/nonroot/node/lib/node_modules" ENV PATH="/home/nonroot/node/bin" EXPOSE 3000