Skip to content

Latest commit

 

History

History
72 lines (46 loc) · 2.11 KB

image_index.md

File metadata and controls

72 lines (46 loc) · 2.11 KB

To load these rules, add this to the top of your BUILD file:

load("@rules_oci//oci:defs.bzl", ...)

oci_image_index_rule

oci_image_index_rule(name, images)

Build a multi-architecture OCI compatible container image.

It takes number of oci_images 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

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