Skip to content

[RFC #0096] validate buildpacks' targets to based images #1301

@buildpack-bot

Description

@buildpack-bot

Today, mixin validation is done by pack both at the time of builder creation and at build time.

For Platform API 0.12 and greater, we should replace mixin validation with target data validation. Namely,

In buildpack.toml:

[[targets]]
os = "linux"
arch = "x86_64"
[[targets.distributions]]
name = "ubuntu"
versions = ["18.04"]

In image config:

  • os
  • architecture
  • variant (if specified)
  • io.buildpacks.distribution.name label (if specified)
  • io.buildpacks.distribution.version label (if specified)

Build-time base image config should match runtime base image config. Buildpack.toml should match both of these.

If an (older) buildpack does not declare target data in buildpack.toml BUT it sets stacks.id = "io.buildpacks.stacks.bionic, pack should assume the following values:

[[targets]]
os = "linux"
arch = "x86_64"
[[targets.distributions]]
name = "ubuntu"
versions = ["18.04"]

If the build-time or runtime base is missing target data but the image contains the label io.buildpacks.stack.id with value io.buildpacks.stacks.bionic, pack should assume the following values:

  • run-image.target.os = "linux"
  • run-image.target.arch = "x86_64"
  • run-image.target.distribution.name = "ubuntu"
  • run-image.target.distribution.version = "18.04"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions