-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Exclude node headers #1597
Exclude node headers #1597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So these are not necessary at runtime?
I will do some testing, but I am pretty sure these are not needed. It is just |
@loosebazooka I've changed the glob in pkg_tar for node, instead of excluding all the files, I am only including the LICENSE file and node binary. Seeing as @pkwarren just pull the binary from the image in this PR bufbuild/plugins#1118, I think it should work fine just include the binary and license. |
@omBratteng I'm going to do a little research before I merge this. I'm afraid of breaking all the node users. But it looks fine otherwise. I will most like merge this tomorrow. |
That's fine, and makes sense |
I think this should be fine but agree that it should be tested. I'm not sure how distroless expects folks to include projects with dependencies that were compiled but I assume it would use the JavaScript build rules which wouldn't use the runtime that's included in the resulting image. |
Usually the way I've done it, is not with bazel. So I just use official node images with debian to install dependencies and build the code, then copy the node_modules directory and any other built files. |
yeah we're not expecting anyone to use distroless images as build time images, they should be using fully featured build containers -- distroless is exclusively for runtime. An alternative is the debug images keeping those tools and stuff. I'll go ahead and merge this. |
No description provided.