Show HN: Smallest Node.js Docker images
github.com
Show HN: Smallest Node.js Docker images
1–10 of 66 posts
Re: Show HN: Smallest Node.js Docker images
#2Re: Show HN: Smallest Node.js Docker images
#3Definitely a cute experiment, but probably of limited real-world use. I wonder what the smallest _practical_ node container would look like?
Re: Show HN: Smallest Node.js Docker images
#4A scratch container doesn't even have busybox in it, does it? If not, this wouldn't be able to run npm, much less install anything which has bindings to other libraries. Definitely a cute experiment, but probably of limited real-world use. I wonder what the smallest _practical_ node container would look like?
It's certainly only practical when every byte matters. At that point it might also make sense to prebundle the dependencies and copy that over.
It'd be interesting to see whether this becomes relevant if serverless-like constraints suddenly apply to a Docker cloud service
Re: Show HN: Smallest Node.js Docker images
#5A scratch container doesn't even have busybox in it, does it? If not, this wouldn't be able to run npm, much less install anything which has bindings to other libraries. Definitely a cute experiment, but probably of limited real-world use. I wonder what the smallest _practical_ node container would look like?
I suppose you could apply the same builder/scrstch separation as this Dockerfile and install using npm/yarn/etc and copy over the result It's certainly only practical when every byte matters. At that point it might also make sense to prebundle the dependencies and copy that over. It'd be interesting to see whether this becomes relevant if serverless-like constraints suddenly apply to a Docker cloud service
Re: Show HN: Smallest Node.js Docker images
#6A scratch container doesn't even have busybox in it, does it? If not, this wouldn't be able to run npm, much less install anything which has bindings to other libraries. Definitely a cute experiment, but probably of limited real-world use. I wonder what the smallest _practical_ node container would look like?
I suppose you could apply the same builder/scrstch separation as this Dockerfile and install using npm/yarn/etc and copy over the result It's certainly only practical when every byte matters. At that point it might also make sense to prebundle the dependencies and copy that over. It'd be interesting to see whether this becomes relevant if serverless-like constraints suddenly apply to a Docker cloud service
Re: Show HN: Smallest Node.js Docker images
#7Re: Show HN: Smallest Node.js Docker images
#8Earlier quoted context omitted.
I suppose you could apply the same builder/scrstch separation as this Dockerfile and install using npm/yarn/etc and copy over the result It's certainly only practical when every byte matters. At that point it might also make sense to prebundle the dependencies and copy that over. It'd be interesting to see whether this becomes relevant if serverless-like constraints suddenly apply to a Docker cloud service
wait, do you mean adding another layer for npm installing other deps?
I suspect this could be relevant many place, keeping images small also hardens security.
Re: Show HN: Smallest Node.js Docker images
#9This is neat! However I don't think I've ever seen a node project who's node_modules wasn't at least 10x the size as one of these images.