Building an app using Cloud Native Buildpacks is as easy as
pack, you can run
pack builder suggest for a list of suggested builders.
pack builder suggest
For this guide we’re actually going to use a sample builder,
cnbs/sample-builder:jammy, which is not listed
as a suggested builder for good reason. It’s a sample.
Now that you’ve decided on what builder to use, we can build our app. For this example we’ll use our samples repo for simplicity.
ls samples || git clone https://github.com/buildpacks/samples
pack build sample-app --path samples/apps/java-maven --builder cnbs/sample-builder:jammy
TIP: If you don’t want to keep specifying a builder every time you build, you can set it as your default builder by running
pack config default-builder <BUILDER>for example
pack config default-builder cnbs/sample-builder:jammy
docker run --rm -p 8080:8080 sample-app
The app should now be running and accessible via localhost:8080.
Linux ARM image builds are now supported!
Windows image builds are now supported!