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

Reduce nodejs image size by removing /nodejs/include directory #1548

Open
pkwarren opened this issue Mar 19, 2024 · 2 comments
Open

Reduce nodejs image size by removing /nodejs/include directory #1548

pkwarren opened this issue Mar 19, 2024 · 2 comments

Comments

@pkwarren
Copy link

Describe the bug
Distroless nodejs images currently include the /nodejs/include directory (55.4M). A large portion of this is /nodejs/include/node/openssl (53.9M) which includes include files for multiple architectures and variants.

To Reproduce
Steps to reproduce the behavior:

  • Pull gcr.io/distroless/nodejs20-debian12:latest or gcr.io/distroless/nodejs20-debian12:debug images:
gcr.io/distroless/nodejs20-debian12                latest            7fc7b55da7d5   N/A              181MB
gcr.io/distroless/nodejs20-debian12                debug             8f8496cf32e2   N/A              183MB
  • Examine the size of the /nodejs/include directory within the container. Note that it makes up ~30% of the overall image size even though a compiler is not shipped in the image to use the include files.

Expected behavior
Either the nodejs images should omit the /nodejs/include directory or provide an image with a different tag to allow users to reduce the size of their nodejs images.

Console Output

$ docker run --rm --entrypoint sh -it gcr.io/distroless/nodejs20-debian12:debug
/ # du -sh /nodejs/include/
55.4M	/nodejs/include/

Additional context
n/a

@loosebazooka
Copy link
Member

Sounds reasonable. Can you point to some documentation about the include directory?

@omBratteng
Copy link
Contributor

@loosebazooka I have created a draft #1597

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

No branches or pull requests

3 participants