Settings

Theme

Create lean Node.js image with Docker multi-stage build

codefresh.io

12 points by jeremyliew 9 years ago · 4 comments

Reader

NationLider 9 years ago

Seriously this! I've seen so many developers build giant unwieldy images because there's been no easy way to manage build dependencies that didn't end with bloat. This is a big win for Docker.

  • dozzie 9 years ago

    > I've seen so many developers build giant unwieldy images because there's been no easy way to manage build dependencies that didn't end with bloat.

    Uhm... What? No, there was, around two decades older than Docker itself. It's just that developers avoid using tools that were written for sysadmins.

    If you build a binary package with your application and another one with your application's dependencies, you avoid all that bloat you mention. Though it's not sexy, because it's an old method and uses things already present in operating system.

jeremyliewOP 9 years ago

Something else great about multi-stage builds is that you can actually put all your unit tests in as part of the build flow. It should make CI more portable.

robinson_k 9 years ago

Great writeup. I know this post is just about Node but the implications for every language are pretty huge.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection