---
title: "Turn Your Code into Docker Images with Cloud Native Buildpacks"
description: "The post presents Cloud Native Buildpacks (CNB) as an alternative to hand-written Dockerfiles for turning application source code into Docker images. It argues that Dockerfiles make developers manage language runtimes, system packages, dependency caching, cleanup, and repeated maintenance, creating a leaky abstraction between application and deployment concerns. CNB uses app-aware buildpacks to detect a project’s language from files such as Gemfile or pom.xml, reuse work from previous builds, download dependencies, prepare the application, and export an OCI-compliant image. The beta buildpacks.io tooling provides pack build and a Heroku builder supporting Ruby, Node.js, Java, Python, PHP, and Go; pack rebase can update an image’s toolchain without rebuilding it. The stated conclusion is that this approach reduces operational complexity while retaining compatibility with Docker tooling and the broader container ecosystem."
---

# Turn Your Code into Docker Images with Cloud Native Buildpacks

[Heroku](https://yomu.fyi/company/heroku) · Terence Lee · Apr 3, 2019

**Type:** Explainer

## Summary

The post presents Cloud Native Buildpacks (CNB) as an alternative to hand-written Dockerfiles for turning application source code into Docker images. It argues that Dockerfiles make developers manage language runtimes, system packages, dependency caching, cleanup, and repeated maintenance, creating a leaky abstraction between application and deployment concerns. CNB uses app-aware buildpacks to detect a project’s language from files such as Gemfile or pom.xml, reuse work from previous builds, download dependencies, prepare the application, and export an OCI-compliant image. The beta buildpacks.io tooling provides pack build and a Heroku builder supporting Ruby, Node.js, Java, Python, PHP, and Go; pack rebase can update an image’s toolchain without rebuilding it. The stated conclusion is that this approach reduces operational complexity while retaining compatibility with Docker tooling and the broader container ecosystem.

## Context

The post addresses the maintenance and operational complexity of hand-written Dockerfiles. Developers must manage runtimes, system packages, dependency installation, build caching, cleanup, image choices, and updates, while repeating these concerns across applications.

## Approach / What changed

Cloud Native Buildpacks use app-aware buildpacks and the buildpacks.io tooling to detect an application’s language and requirements, reuse work from prior builds, install dependencies, prepare the application, and export an OCI-compliant Docker image. The pack CLI supports building images, while pack rebase updates an image’s toolchain without rebuilding it.

## Takeaways

- Dockerfiles require application-specific handling of runtime packages, dependency caching, cleanup, and future dependency changes, which the post describes as a leaky abstraction.
- CNB detects application requirements from project files such as Gemfile and pom.xml, then builds and exports an OCI-compliant image compatible with existing Docker tooling.
- The beta Heroku builder supports Ruby, Node.js, Java, Python, PHP, and Go; pack rebase can update an image’s toolchain in less than a second without rebuilding it.

**Tags:** [Cloud Native Buildpacks](https://yomu.fyi/topic/cloud-native-buildpacks), [Docker](https://yomu.fyi/topic/docker)

- Source: [Heroku](https://www.heroku.com/blog/docker-images-with-buildpacks)
- Source URL: https://www.heroku.com/blog/docker-images-with-buildpacks
- Ingested by Yomu: 2026-09-09T14:27:20.370Z

[Read original post](https://www.heroku.com/blog/docker-images-with-buildpacks)
