Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc-js-xds: Use distroless Node image for interop Dockerfile #2477

Merged
merged 2 commits into from Jun 26, 2023

Conversation

murgatroid99
Copy link
Member

Switching to distroless to minimize exposure to vulnerabilities.

@sergiitk
Copy link
Member

sergiitk commented Jun 23, 2023

@sergiitk
Copy link
Member

This reduced the number of vulnerabilities from 27 to 9. All low severity without fixes.

Recent master build, FROM node:18-slim: http://gcr.io/grpc-testing/xds-interop/node-client:186718cb70af708c75584909b21169289d7363b2
image

This PR build, FROM gcr.io/distroless/nodejs18-debian11:latest: http://gcr.io/grpc-testing/xds-interop/node-client:cc89158e132a0c6dc2ab099a487731b0093df37a
image

I call it a win.

@sergiitk
Copy link
Member

Failed with

WARNING 2023-06-23T07:35:58Z Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown

😦

@@ -27,7 +27,7 @@ RUN npm install
WORKDIR /node/src/grpc-node/packages/grpc-js-xds
RUN npm install

FROM node:18-slim
FROM gcr.io/distroless/nodejs18-debian11:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it expects /nodejs/bin/node instead of node in ENTRYPOINT: https://github.com/GoogleContainerTools/distroless/blob/main/nodejs/BUILD#L38

@sergiitk
Copy link
Member

sergiitk commented Jun 23, 2023

Copy link
Member

@sergiitk sergiitk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed test suites: 0

@murgatroid99 murgatroid99 merged commit 2ee8a68 into grpc:master Jun 26, 2023
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants