Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Releases: bazel-contrib/rules_img

v0.3.4

31 Jan 18:47
2e38164

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "a58f553caa5ab2d807ea2ee80f552e8d0668036922d8a66ace152d717b3b5e09",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.3.4/rules_img-v0.3.4.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

  • Nix: make dev shell build on macOS by @malt3 in #365
  • image_layer: speed up calculation of hashes when processing existing tar by @malt3 in #366
  • Fixes image manifest for arm64 images without variant by @alexnovak in #361
  • Clear Cmd when setting Entrypoint to match Docker/OCI behavior by @malt3 in #372
  • update hermetic_launcher to 0.0.4 by @malt3 in #383
  • cleanup go.sum by @malt3 in #389
  • Support username:password in gRPC URL for remote_cache by @malt3 in #385
  • improve PullInfo selection in image_index for multi-base scenarios by @malt3 in #390
  • manifest_from_oci_layout: allow "arm" architecture by @malt3 in #391
  • update BCR deps by @malt3 in #392
  • Fix handling of source directories in image_layer by @malt3 in #371
  • Bazel 8.x: test against 8.5.1 by @malt3 in #386
  • prepare 0.3.4 by @malt3 in #401

New Contributors

Full Changelog: v0.3.3...v0.3.4

v0.3.3

18 Dec 15:14
6bb719f

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "de4b3b2a8bf66358c698099ab6448cb482d77da7a9b113a090072362e676b8b0",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.3.3/rules_img-v0.3.3.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

  • Create custom launcher binary for every push, load, and deploy by @malt3 in #336
  • rename Go package "deploy" -> "deploymetadata" by @malt3 in #347
  • rename Go package "push" -> "deploy" by @malt3 in #348
  • pass deploy metadata file path via argv by @malt3 in #349
  • bazel: upgrade hermetic_launcher to 0.0.3 by @malt3 in #350
  • Add per-target prefix to elements in runfiles.root_symlinks by @malt3 in #351
  • Add podman support for image loading by @malt3 in #352
  • Add generic daemon option for custom container runtimes by @malt3 in #353
  • Update container structure test part of migration guide by @malt3 in #354
  • image_load: enable use of loader as data dependency in test by @malt3 in #356
  • Add layer hints for lazy deploy strategy to optimize data transfer by @malt3 in #357
  • prepare 0.3.3 by @malt3 in #359
  • Layer transfer statistics by @malt3 in #358

Full Changelog: v0.3.2...v0.3.3

v0.3.2

11 Dec 13:29
dbaf7f3

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "7960ca8f489464b8cb8387f168f3f2f627bbdab638f03c69a7152c1da72222c3",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.3.2/rules_img-v0.3.2.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

  • ImageManifestInfo: remove base_image field by @malt3 in #321
  • progress bar: fix more visual glitches by @malt3 in #322
  • image_layer: avoid hardlink cycles by @malt3 in #324
  • tests: add check that ensures layer invariants are intact by @malt3 in #328
  • tests: detect regression of self-hardlinks by @malt3 in #331
  • prepare 0.3.2 by @malt3 in #332

Full Changelog: v0.3.1...v0.3.2

v0.3.1

09 Dec 20:43

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "c994826cd6a3b419afafbc70add5421b84b02670ec963db88214ebf310167492",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.3.1/rules_img-v0.3.1.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

  • ci: only use RBE if credentials are available by @malt3 in #286
  • export DeployInfo provider by @rafikk in #285
  • image_manifest: provide base image in template expansion by @malt3 in #294
  • renovate: ensure Bazel lockfile is updated by @malt3 in #302
  • pull: allow downloading image without digest by @malt3 in #303
  • images.pull module extension by @malt3 in #300
  • images module extension: allow downloading blobs from multiple sources by @malt3 in #305
  • images.pull: Synchronize all missing facts in parallel by @malt3 in #306
  • ci: test against Bazel 9.0.0rc3 by @malt3 in #309
  • root module: Build with Bazel 9.0.0rc3 by @malt3 in #292
  • pull: succeed if any of the sources serve blob by @malt3 in #317
  • images.pull: support mapping repositories with friendly names by @malt3 in #315
  • deploy: add multi-writer for progress by @malt3 in #318

Full Changelog: v0.2.12...v0.3.1

v0.3.0

09 Dec 20:19
Immutable release. Only release title and notes can be modified.
48d711e

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "c528b2de239c78f9d374c81e50c4caa7351269cf7d4ea94bd165adad606c03a4",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.3.0/rules_img-v0.3.0.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

  • ci: only use RBE if credentials are available by @malt3 in #286
  • export DeployInfo provider by @rafikk in #285
  • image_manifest: provide base image in template expansion by @malt3 in #294
  • renovate: ensure Bazel lockfile is updated by @malt3 in #302
  • pull: allow downloading image without digest by @malt3 in #303
  • images.pull module extension by @malt3 in #300
  • images module extension: allow downloading blobs from multiple sources by @malt3 in #305
  • images.pull: Synchronize all missing facts in parallel by @malt3 in #306
  • ci: test against Bazel 9.0.0rc3 by @malt3 in #309
  • root module: Build with Bazel 9.0.0rc3 by @malt3 in #292
  • pull: succeed if any of the sources serve blob by @malt3 in #317
  • images.pull: support mapping repositories with friendly names by @malt3 in #315
  • deploy: add multi-writer for progress by @malt3 in #318

Full Changelog: v0.2.12...v0.3.0

v0.2.12

02 Dec 15:55

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "c53e0e2d9b1d58ad1dc2a9efe236fc6384fbe67e771959eb98b2a2410b0b8835",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.2.12/rules_img-v0.2.12.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.

Full Changelog: v0.2.11...v0.2.12

v0.2.10

29 Nov 00:27

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "6af3a3c22fefa7156be10109b2a052aa373b0b2963e3bbf6f3993807e2510ecc",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.2.10/rules_img-v0.2.10.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

  • image_layer: determine runfiles repo name based on short_path of File by @malt3 in #248
  • repository rules: allow downloading individual blobs by @malt3 in #251
  • macos-13 runners are being phased out by @malt3 in #253
  • image_layer: include repo mapping manifest next to runfiles by @malt3 in #257
  • fix symlink handling by @scaiper in #255
  • image_layer: create parent directories in tar layers by @rafikk in #259
  • image_layer: make creation of parent directories configurable by @malt3 in #260
  • image_layer: allow omitting runfiles by @malt3 in #261
  • image_layer: avoid creating ".cas" directory by @malt3 in #262
  • Add annotations_file attribute by @malt3 in #263
  • Add manifest annotations to oci-layout index.json by @moroten in #267
  • image_layer: use correct symlink target for links from root by @malt3 in #268
  • Switch to bazel_lib by @malt3 in #264
  • pull: configurable Docker config path for lazy layer download by @malt3 in #269

New Contributors

Full Changelog: v0.2.9...v0.2.10

v0.2.9

12 Nov 18:34
13f3980

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "9dda401538d9ce2326968ff94b5439a4e2a347a6267620e759250686dc278b2f",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.2.9/rules_img-v0.2.9.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

  • migration guide by @malt3 in #216
  • Convert between rules_oci targets and rules_img targets by @malt3 in #218
  • CI: test against Bazel 9.0.0rc1 in integration test by @malt3 in #227
  • Support oci architecture variant by @malt3 in #223
  • pull: use canonical label to refer to @platforms by @malt3 in #231
  • img_tool: use shared function to write layer metadata by @malt3 in #232
  • docs: explain how rules_img uses platforms by @malt3 in #233
  • pull_tool: prepare for blob sharing by @malt3 in #234
  • doc: Fix a name error in an example by @jaqx0r in #235
  • e2e: add integration test with testcontainers that works on Apple Silicon by @malt3 in #236
  • image_load: support adding tags via the command line by @malt3 in #243
  • add example of container structure test by @malt3 in #242

New Contributors

Full Changelog: v0.2.8...v0.2.9

v0.2.8

29 Oct 13:13

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "9cc7b0bafb55f4f6fb1e19b038c18b3ec05dfb5b143e72b7078b92263acf72fc",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.2.8/rules_img-v0.2.8.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

  • Support multiple tags in image_load rule by @malt3 in #194
  • Document registry authentication by @malt3 in #196
  • containerd image loading platform filtering by @malt3 in #197
  • upgrade bazel nightly to 9.0.0-pre.20251022.1 by @malt3 in #210
  • Add created attribute to image_manifest rule by @malt3 in #212
  • Store Bazel lockfile in Git by @malt3 in #211
  • Platform transition on single-platform image_manifest by @malt3 in #208
  • feat: add tag_file attribute to image_push and image_load by @malt3 in #213
  • Allow for guessing mediaType in more places by @malt3 in #207

Full Changelog: v0.2.7...v0.2.8

v0.2.7

22 Oct 22:04
7321ee8

Choose a tag to compare

Using Bzlmod

Add the following to your MODULE.bazel file:

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

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 = "0a3514d03e29820acdc027d05317ee7f28f996445c32765116c4261c21a09995",
    urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.2.7/rules_img-v0.2.7.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

  • Add distroless demo by @malt3 in #148
  • enable nogo by @malt3 in #162
  • oci_tarball: use forward slash for tar contents by @malt3 in #178
  • Correctly handle compression in layer_from_tar by @malt3 in #185
  • pull: detect root blob mediaType if missing by @malt3 in #189
  • deploy rules: Use extra execution group to obtain "bazel run" tool by @malt3 in #187

Full Changelog: v0.2.6...v0.2.7