Add support for pack build --label
#2268
Labels
status/discussion-needed
Issue or PR that requires in-depth discussion.
type/enhancement
Issue that requests a new feature or improvement.
Description
The
pack builder create
andpack buildpack package
commands both support a--label
argument for adding OCI image labels to the builder and buildpacks images respectively, added in #2034 and #1877. Similarly, buildpacks can set app image labels via the[[labels]]
table inlaunch.toml
- for example as used by paketo-buildpacks/image-labels.However, it's not currently possible to add labels to the app image when calling
pack build
.This means that in basecamp/kamal#916 the
service
label required by Kamal can't be set when callingpack build
, and instead thepaketo-buildpacks/image-labels
buildpack has to be injected. This has a couple of downsides:If
pack build
supported setting image labels natively, then there would be no need to use this buildpack injection based approach.Proposed solution
Add
--label
support topack build
, similar to that already supported bypack builder create
andpack buildpack package
.cc @nickhammond
The text was updated successfully, but these errors were encountered: