To load these rules, add this to the top of your BUILD
file:
load("@rules_oci//oci:defs.bzl", ...)
oci_image_index_rule(name, images)
Build a multi-architecture OCI compatible container image.
It takes number of oci_image
s to create a fat multi-architecture image.
Requires wc
and either sha256sum
or shasum
to be installed on the execution machine.
oci_image(
name = "app_linux_amd64"
)
oci_image(
name = "app_linux_arm64"
)
oci_image_index(
name = "app",
images = [
":app_linux_amd64",
":app_linux_arm64"
]
)
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
images | List of labels to oci_image targets. | List of labels | required |
oci_image_index(name, kwargs)
Macro wrapper around oci_image_index_rule.
Produces a target [name].digest
, whose default output is a file containing the sha256 digest of the resulting image.
This is the same output as for the oci_image
macro.
PARAMETERS
Name | Description | Default Value |
---|---|---|
name | name of resulting oci_image_index_rule | none |
kwargs | other named arguments to oci_image_index_rule and common rule attributes. | none |