Hacker News new | ask | show | jobs
by jacques_chester 2817 days ago
Buildpacks focus on turning sourcecode into a runnable container. Essentially you just throw code at it and It Just Works.

I think the Onsi Haiku is still the best description:

    Here is my source code.
    Run it on the cloud for me.
    I do not care how.
Heroku invented this, it's been picked up by lots of other groups (including for Cloud Foundry -- I've worked on buildpacks for Pivotal in that regard).

> (1) VMWare images (2) Docker images

You have to build these yourselves. The boundary is your CI system, Dockerfile etc -- which you have to maintain. Buildpacks provide a curated, managed, easily upgraded system that does this for you.

> (3) Debian packages?

These are, in some sense, on the far side of where Buildpacks sit. But also slightly different. A debian package is intended to land in a pluripotent environment, possibly under direct human supervision. A Buildpack is meant to build completely self-contained runnable images, starting from sourcecode.

1 comments

> Buildpacks focus on turning sourcecode into a runnable container

So buildpacks are like Debian source packages?

It's a package of my .c files, and the consumer runs $(CC) to compile and run those and It Just Works?

Not quite. The source package has to be packaged by someone, then dpkg knows what to do with it.

A Buildpack instead takes source as it is. You use Maven? The relevant buildpacks recognise pom.xml and know what to do. Bundler? Ruby buildpack sees the Gemfile and takes responsibility. And so on.

I as a developer can send the same sourcecode I have in my git repo or on my local filesystem, with no additional effort to prep it. The buildpack does all the work.

Putting it another way: it makes sense to create a debian source package buildpack. There are apt buildpacks in the wild, I expect they'll be revisited.

> The source package has to be packaged by someone

Same with buildpack-packager.

But I get the idea. Thanks for explaining!