pub struct Target {
pub os: String,
pub arch: String,
pub arch_variant: Option<String>,
pub distro_name: String,
pub distro_version: String,
}
Fields§
§os: String
The name of the target operating system.
The value should conform to Go’s $GOOS
, for example
linux
or windows
.
CNB lifecycle
sources this value from the run OCI image’s os
property.
arch: String
The name of the target CPU architecture.
The value should conform to Go’s $GOARCH, for example
amd64
or arm64
.
CNB lifecycle
sources this value from the run OCI image’s architecture
property.
arch_variant: Option<String>
The variant of the specified CPU architecture.
The value should conform to OCI image spec platform variants, for example
v7
or v8
.
CNB lifecycle
sources this value from the run OCI image’s variant
property.
distro_name: String
The name of the operating system distribution. Should be empty for Windows.
For example: ubuntu
or alpine
.
CNB lifecycle
sources this value from either:
- The
io.buildpacks.base.distro.name
OCI image label, if set on the run image. - Or else, the
ID
field of the/etc/os-release
file in the build image.
distro_version: String
The version of the operating system distribution.
For example: 22.04
or 3.19
.
CNB lifecycle
sources this value from either:
- The
io.buildpacks.base.distro.version
OCI image label, if set on the run image. - Or else, the
VERSION_ID
field of the/etc/os-release
file in the build image.