Uses Dagger Python SDK to build an app with buildpacks and pushes the built image to a registry.
bpcli
calls the Cloud Native Buildpacks lifecycle
commands from within a builder
container to build or rebase images.
It does not rely on the Pack CLI.
Also bpcli
does not require Docker, if a buildkit daemon is available. This has currently been tested with Podman.
pip install bpcli
Usage: bpcli build [OPTIONS] IMAGE
Generate app image from source code using the provided image name.
Options:
--builder TEXT Builder image [default:
paketobuildpacks/builder:base]
--path TEXT Path to app dir [default: .]
--log-level TEXT Log level [default: info]
--docker-config-json TEXT Path to docker config json file with registry
credentials
--env TEXT Set an environment variable
--help Show this message and exit.
bpcli build --path=/path/to/your/go/app <your image name>
Build a PHP application using the paketo full builder, with debug logs, registry authentication and report containing the image tag and digest:
bpcli build \
--path=/path/to/your/php/app \
--builder=paketobuildpacks/builder:full \
--log-level=debug foo/bar \
--docker-config-json=$HOME/.docker/config.json > report.toml
Adding environment variables:
bpcli build --path=/path/to/your/app foo/bar --env FOO=bar --env BAR=foo
Usage: bpcli rebase [OPTIONS] IMAGE
Rebase app image.
Options:
--builder TEXT Builder image [default:
paketobuildpacks/builder:base]
--log-level TEXT Log level [default: info]
--docker-config-json TEXT Path to docker config json file with registry
credentials
--help Show this message and exit.
bpcli rebase --log-level=debug --docker-config-json=$HOME/.docker/config.json foo/bar