The concept of “targets” is used to identify compatibility between buildpacks and base images.
Target data includes:
For Linux-based images, operating system distribution name and version should be the values in
For Windows-based images, operating system distribution name is blank, and version should be the value of
os.version in the image config (e.g.,
Buildpacks may declare the targets they are compatible with in
This information will be used by
pack (or other platforms) and the lifecycle to avoid running buildpacks on images they aren’t designed to work with.
Additionally, during builds this information will be read by the lifecycle from the run image and exposed to buildpacks through
CNB_TARGET_ environment variables:
Buildpacks can use this information to modify their behavior depending on the target.