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

Why the Image is so big? #311

Closed
davidgatti opened this issue Jan 22, 2017 · 2 comments
Closed

Why the Image is so big? #311

davidgatti opened this issue Jan 22, 2017 · 2 comments

Comments

@davidgatti
Copy link

@davidgatti davidgatti commented Jan 22, 2017

Simple question, to docker image is over 600MB seams bit excessive. If I build my now image based on Debian then it is a bit over 200MB (where my Dockerfile is not optimized).

How come such big image?

@chorrell
Copy link
Contributor

@chorrell chorrell commented Jan 23, 2017

The main image is based buildpack-deps:jessie which is where most of the size comes from. Historically that base layer was chosen to make it easier for consumers to get started since a lot of dependencies are installed so most npm packages etc. should install without issue.

Over time it became obvious that most consumers cared more about the image size than having a lot of libraries etc installed, so that's why we now have the node:slim and node:alpine variants which are much more reasonable in size.

You'll find that the node:slim image is around the same size your custom Debian image and that's what I'd recommend using. Actually, I would recommend pinning to a major version to avoid any surprises, like use node:4-slim or node:6-slim etc.

@davidgatti
Copy link
Author

@davidgatti davidgatti commented Jan 23, 2017

Perfect, thank you your explanation :)

@davidgatti davidgatti closed this Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants