Skip to content

Buildpacks Basics

homepage-banner

What is a buildpack?

A buildpack is a set of executables that inspects your app source code and creates a plan to build and run your application.

How does a buildpack work?

A buildpack is a set of scripts that are executed in order to detect, build, and run your application. The scripts are written in any language that can be executed on the platform where the buildpack is running. The buildpacks are executed in the order they are listed in the buildpack.toml file.

Two phases of a buildpack

  • Detection: Buildpacks tooling will navigate your source code to discover which programming language or framework is used (e.g., POM, NPM files, Python requirements, etc.) and assign a suitable buildpack for the build.
  • Building: Once a buildpack is found, the source is compiled and Buildpacks create a container image with the appropriate entry point and startup scripts.

Usage

brew install buildpacks/tap/pack

Could download the demo project from https://github.com/gitops-cookbook/chapters/tree/main/chapters/ch03/nodejs-app

pack builder suggest

References

  • https://buildpacks.io/docs/concepts/components/buildpack/
Leave a message