Skip to content

v0.3.6

Choose a tag to compare

@github-actions github-actions released this 03 Apr 15:01
· 18 commits to main since this release
1047bc7

Using Bzlmod

Add the following to your MODULE.bazel file:

bazel_dep(name = "rules_img", version = "0.3.6")

For further instructions, see the README.

Using WORKSPACE

Add the following to your WORKSPACE.bazel file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_img",
    sha256 = "d0849cb4828569d7ec159f8c0761ed62b60798e7943d1700d800ceea2c28108a",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.3.6/rules_img-v0.3.6.tar.gz"],
)

# Load dependencies
load("@rules_img//img:dependencies.bzl", "rules_img_dependencies")
rules_img_dependencies()

# Register prebuilt toolchains
load("@rules_img//img:repositories.bzl", "img_register_prebuilt_toolchains", "pull_tool_register_prebuilt_repositories")
img_register_prebuilt_toolchains()
register_toolchains("@img_toolchain//:all")

# Register prebuilt pull_tool repositories (for pull functionality)
pull_tool_register_prebuilt_repositories()

# Example: Pull a base image
load("@rules_img//img:pull.bzl", "pull")
pull(
    name = "alpine",
    digest = "sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1",
    registry = "index.docker.io",
    repository = "library/alpine",
    tag = "3.22",
)

For more examples, see the README.

What's Changed

Full Changelog: v0.3.5...v0.3.6