Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.49 KB

tarball.md

File metadata and controls

45 lines (28 loc) · 1.49 KB

Create a tarball from oci_image that can be loaded by runtimes such as podman and docker.

For example, given an :image target, you could write

oci_tarball(
    name = "tarball",
    image = ":image",
    repo_tags = ["my-repository:latest"],
)

and then run it in a container like so:

bazel run :tarball
docker run --rm my-repository:latest

oci_tarball

oci_tarball(name, image, repo_tags)

Creates tarball from OCI layouts that can be loaded into docker daemon without needing to publish the image first.

Passing anything other than oci_image to the image attribute will lead to build time errors.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
image Label of a directory containing an OCI layout, typically oci_image Label required
repo_tags a file containing repo_tags, one per line. Label required