Getting Started
Verified against
packv0.40.7. Commands assume a running Docker daemon, becausepack buildproduces the image in the local Docker daemon.
Prerequisites
- Docker running locally.
- The
packCLI installed (below).
Install
bash
brew install buildpacks/tap/packA first working setup
The shortest path to a runnable image is to build an app directory with a Paketo builder, then run it.
From your application source directory, build an image with a Paketo builder.
bashpack build my-app --builder paketobuildpacks/builder-jammy-baseRun the resulting image.
bashdocker run -d -p 8080:8080 -e PORT=8080 my-app
To follow the official tutorial against a sample app instead, build the bundled Java sample with the sample builder.
bash
pack build sample-app --path samples/apps/java-maven --builder cnbs/sample-builder:resoluteVerify it works
pack builder suggestlists candidate builders.pack config default-builder <builder>sets a default so you can omit--builder.- After
docker run, confirm the container is serving on the mapped port (http://localhost:8080).
Where to go next
- Paketo builder reference and production builders: paketo.io/docs/howto/builders.
- Official app-developer tutorials and concepts: buildpacks.io docs.