GoogleContainerTools / distroless

🥑 Language focused docker images, minus the operating system.
Apache License 2.0
17.94k stars 1.09k forks source link

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

Open pkwarren opened 2 months ago

pkwarren commented 2 months ago

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:

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 commented 2 months ago

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

omBratteng commented 2 weeks ago

@loosebazooka I have created a draft #1597