pack buildpack package

pack buildpack package

Package a buildpack in OCI format.

Synopsis

buildpack package allows users to package (a) buildpack(s) into OCI format, which can then to be hosted in image repositories or persisted on disk as a ‘.cnb’ file. You can also package a number of buildpacks together, to enable easier distribution of a set of buildpacks. Packaged buildpacks can be used as inputs to pack build (using the --buildpack flag), and they can be included in the configs used in pack builder create and pack buildpack package. For more on how to package a buildpack, see: https://buildpacks.io/docs/buildpack-author-guide/package-a-buildpack/.

pack buildpack package <name> --config <config-path> [flags]

Examples

pack buildpack package my-buildpack --config ./package.toml
pack buildpack package my-buildpack.cnb --config ./package.toml --f file

Options

  -r, --buildpack-registry string   Buildpack Registry name
  -c, --config string               Path to package TOML config
      --flatten                     Flatten the buildpack into a single layer
  -e, --flatten-exclude strings     Buildpacks to exclude from flattening, in the form of '<buildpack-id>@<buildpack-version>'
  -f, --format string               Format to save package as ("image" or "file")
  -h, --help                        Help for 'package'
  -l, --label stringToString        Labels to add to packaged Buildpack, in the form of '<name>=<value>' (default [])
  -p, --path string                 Path to the Buildpack that needs to be packaged
      --publish                     Publish the buildpack directly to the container registry specified in <name>, instead of the daemon (applies to "--format=image" only).
      --pull-policy string          Pull policy to use. Accepted values are always, never, and if-not-present. The default is always
  -t, --target strings              Target platforms to build for.
                                    Targets should be in the format '[os][/arch][/variant]:[distroname@osversion@anotherversion];[distroname@osversion]'.
                                    - To specify two different architectures: '--target "linux/amd64" --target "linux/arm64"'
                                    - To specify the distribution version: '--target "linux/arm/v6:ubuntu@14.04"'
                                    - To specify multiple distribution versions: '--target "linux/arm/v6:ubuntu@14.04"  --target "linux/arm/v6:ubuntu@16.04"'
                                    	

Options inherited from parent commands

      --force-color   Force color output
      --no-color      Disable color output
  -q, --quiet         Show less output
      --timestamps    Enable timestamps in output
  -v, --verbose       Show more output

SEE ALSO