v1

Build /

Build with buildpacks

You can build your projects on Northflank using buildpacks . This does not require you to supply a Dockerfile as a buildpack will try to automatically determine how to build your project. You must specify the build context (root by default).

Select buildpack as the build type when creating your service, or change an existing service from the build options page.

You can select from a list of popular buildpacks under advanced build settings if you require support for other languages. Check the provider's documentation for more information on base images and language versions.

Buildpack stack options in the Northflank application

Buildpack stacks on Northflank

Buildpack stackBase imageSupported languages
heroku/builder:22 1Ubuntu 22.04Go, Java, Node.js, PHP, Python, Ruby, Scala
heroku/builder-classic:22 1Ubuntu 22.04Go, Java, Node.js, PHP, Python, Ruby, Scala, Clojure
heroku/buildpacks:20 (deprecated)Ubuntu 20.04Go, Java, Node.js, PHP, Python, Ruby, Scala
heroku/buildpacks:18 (deprecated)Ubuntu 18.04Go, Java, Node.js, PHP, Python, Ruby, Scala
gcr.io/buildpacks/builder:v1 Ubuntu 18.04Node.js, Python, Go, Java, Ruby
cnbs/sample-builder:alpine 2Alpine 3.10Java, Kotlin
cnbs/sample-builder:bionic 2Ubuntu 18.04Java, Kotlin, Ruby
paketobuildpacks/builder:tiny Ubuntu 18.04Java, Go
paketobuildpacks/builder:base Ubuntu 18.04Java, Node.js, Go, .NET Core, Ruby, NGINX
paketobuildpacks/builder:full Ubuntu 18.04PHP, Java, Node.js, Go, .NET Core, Ruby, NGINX, HTTPD
  1. Heroku builder stacks are compatible with the Cloud Native Buildpacks specification
  2. Cloud Native Buildpack stack samples are not recommended for use in production.

Custom buildpack group

You can use multiple buildpacks together to provide support for more complex builds. For example, you might use one buildpack to install Java, and another buildpack to use Maven to build your application. The builder will run through all the buildpacks to identify the correct ones to use in the build.

You can specify buildpacks in one of the following formats:

SourceFormatExampleNotes
URLhttps://<host>/<path>https://buildpack-registry.heroku.com/cnb/heroku/nodejsNeeds to resolve to a tar.gz file
Github URLhttps://<host>/<path>https://github.com/heroku/heroku-buildpack-nodejs.gitMay further specify a tag, branch or commit ID using the format https://<host>/<repo>#<tag/branch/commit-id>
Image[docker://][<host>]/<path>[:<tag>]docker://docker.io/heroku/procfile-cnb:latestCan use @digest instead of :<tag>
CNB registry resourceurn:cnb:registry[:<id>[@<version>]]urn:cnb:registry:heroku/nodejs

If a string does not include a scheme prefix (ex. docker://) the buildpack type can be inferred from the format:

  • If it looks like a Docker ref, it will be treated as a docker:// URI
  • If it looks like a buildpack Registry ID, it will be treated as a urn:cnb:registry URI

Layer caching

You can make buildpack builds more efficient and faster on subsequent builds by enabling caching. If enabled, the build engine will cache and reuse build dependencies from previous builds.

Learn more in the buildpack documentation .

© 2024 Northflank Ltd. All rights reserved.