Releases: bazel-contrib/rules_img
v0.2.8
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
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
v0.2.6
Using Bzlmod
Add the following to your MODULE.bazel file:
bazel_dep(name = "rules_img", version = "0.2.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 = "2437a800c7c3369c0091c45aa0de83805ccbde53956658cbf44e9b74dc67e498",
urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.2.6/rules_img-v0.2.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
What's Changed
- Warn about digest mismatch when using docker load by @malt3 in #94
- feat: run Linux CI jobs on Aspect Workflows by @alexeagle in #101
- further fix containerd loading by @TroyKomodo in #106
- GitHub Actions: avoid running on Renovate PRs by default by @malt3 in #125
- use prebuilt protoc toolchain by @malt3 in #127
- release note generator: add categories by @malt3 in #126
- load: move warning to stderr by @TroyKomodo in #129
- load: remove bad log by @TroyKomodo in #131
- Vendor generated Go code by @malt3 in #132
- Separate out "pull_tool" binary by @malt3 in #137
- load: minor improvements by @TroyKomodo in #136
- Support Bazel 9 by @malt3 in #143
- Add support for
--repo_contents_cacheby @malt3 in #144
Full Changelog: v0.2.5...v0.2.6
v0.2.5
Using Bzlmod
Add the following to your MODULE.bazel file:
bazel_dep(name = "rules_img", version = "0.2.5")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 = "0e7a69e8a0f453b28e384f4483b7e47ab91ac6ae9a312924e6467ea50daefa97",
urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.2.5/rules_img-v0.2.5.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")
img_register_prebuilt_toolchains()
register_toolchains("@img_toolchain//:all")
# 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
- tar layer creation: calculate digests of inputs in advance by @malt3 in #73
- add rootless common containerd paths by @TroyKomodo in #77
- fix containerd loader logic by @TroyKomodo in #79
- chore: Configure Renovate by @renovate[bot] in #75
- push/load/multi_deploy: correctly choose img tool for host by @malt3 in #86
- mass-rename after migration: s/tweag/bazel-contrib/g by @malt3 in #83
- chore(deps): update bazel-contrib/publish-to-bcr action to v0.2.3 by @renovate[bot] in #88
- fix(deps): update google.golang.org/genproto/googleapis/api digest to 57b25ae by @renovate[bot] in #84
- chore(deps): update dependency rules_python to v1.6.3 by @renovate[bot] in #91
- chore(deps): update actions/checkout digest to 08eba0b by @renovate[bot] in #80
- README: add Tweag logo by @malt3 in #89
New Contributors
- @TroyKomodo made their first contribution in #77
- @renovate[bot] made their first contribution in #75
Full Changelog: v0.2.4...v0.2.5
v0.2.4
Using Bzlmod
Add the following to your MODULE.bazel file:
bazel_dep(name = "rules_img", version = "0.2.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 = "72e2aef5d26c5708beb0a9c01d24f3b558b52f757850a14bc5b8cd671c00ffb5",
urls = ["https://github.com/tweag/rules_img/releases/download/v0.2.4/rules_img-v0.2.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")
img_register_prebuilt_toolchains()
register_toolchains("@img_toolchain//:all")
# 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
- Ability to write oci and docker tarballs by @malt3 in #67
- fix: use expanded tag template in image_load tarball output by @malt3 in #68
- stamping in config, manifest and index by @malt3 in #69
- parallel gzip support by @malt3 in #70
- integration tests: remove credential helper by @malt3 in #71
- pull: handle missing "registry" attr correctly by @malt3 in #72
Full Changelog: v0.2.3...v0.2.4
v0.2.3
Using Bzlmod
Add the following to your MODULE.bazel file:
bazel_dep(name = "rules_img", version = "0.2.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 = "2102707391184af3c13e68ed0498a7f2ac9e7e23d7f975a3287b0838610316b3",
urls = ["https://github.com/tweag/rules_img/releases/download/v0.2.3/rules_img-v0.2.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")
img_register_prebuilt_toolchains()
register_toolchains("@img_toolchain//:all")
# 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
- Check for nil "Created" timestamp in image config when merging by @malt3 in #59
- loader: set default load platform to Linux by @malt3 in #56
- cas read: don't set explicit read limit by @malt3 in #61
- img push: return with non-zero exit code when pushing fails by @malt3 in #60
- cas: wrap errors to indicate that they originate from a Bazel remote cache by @malt3 in #62
- tarcas: remove size from hardlinks by @malt3 in #63
Full Changelog: v0.2.2...v0.2.3
v0.2.2
Using Bzlmod
Add the following to your MODULE.bazel file:
bazel_dep(name = "rules_img", version = "0.2.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 = "bafd81f0af49ef32d560653006646119a7210522aa1f5a7b892039b919ccddc9",
urls = ["https://github.com/tweag/rules_img/releases/download/v0.2.2/rules_img-v0.2.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")
img_register_prebuilt_toolchains()
register_toolchains("@img_toolchain//:all")
# 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
- move shared stamping code into a separate bzl file by @malt3 in #47
- Only stamp if template strings are present by @malt3 in #48
- enable stamping by default by @alexeagle in #44
- Handle nil status from BatchReadBlobs by @mortenmj in #52
- Interpolate workspace in credential helper path by @psalaberria002 in #51
- Refactor load and push to enable "multi deploy" by @malt3 in #53
- Implement "multi_deploy" rule by @malt3 in #54
- mark pull#tag as optional by @malt3 in #55
New Contributors
- @alexeagle made their first contribution in #44
- @psalaberria002 made their first contribution in #51
Full Changelog: v0.2.1...v0.2.2
v0.2.1
Using Bzlmod
Add the following to your MODULE.bazel file:
bazel_dep(name = "rules_img", version = "0.2.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 = "817c5df25923be0c7e340e6f16d9bbc6c62f03ac68497b0d681e7a6582e7910b",
urls = ["https://github.com/tweag/rules_img/releases/download/v0.2.1/rules_img-v0.2.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")
img_register_prebuilt_toolchains()
register_toolchains("@img_toolchain//:all")
# 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 JS example by @malt3 in #36
- Check for empty tar by @malt3 in #37
- WORKSPACE support by @malt3 in #39
- Add CLI flags to push command for additional tags and registry override by @malt3 in #40
- improve credential helper setting docs in main README by @malt3 in #41
- Add ci bazelrc options by @malt3 in #42
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- image_manifest: fully embrace platforms by @malt3 in #23
- image_manifest: automatically convert tar layers by @malt3 in #34
- Move Go code into separate Bazel module by @malt3 in #30
- Use img tool in pull repo rule by @malt3 in #31
- add Python example by @malt3 in #35
- add a clear failure message if nested index is found by @malt3 in #25
- Fix template expansion in image_load rule by @malt3 in #27
- Try Google credentials as a fallback after trying DefaultKeychain by @mortenmj in #28
- add zig toolchain for better remote execution support by @malt3 in #29
- add a test to show that the rules can be extended by @malt3 in #32
New Contributors
Full Changelog: v0.1.5...v0.2.0
v0.2.0-rc1
What's Changed
- add a clear failure message if nested index is found by @malt3 in #25
- Fix template expansion in image_load rule by @malt3 in #27
- Try Google credentials as a fallback after trying DefaultKeychain by @mortenmj in #28
- image_manifest: fully embrace platforms by @malt3 in #23
- add zig toolchain for better remote execution support by @malt3 in #29
- Move Go code into separate Bazel module by @malt3 in #30
- Use img tool in pull repo rule by @malt3 in #31
- add a test to show that the rules can be extended by @malt3 in #32
- Prepare 0.2.0-rc0 by @malt3 in #33
New Contributors
Full Changelog: v0.1.5...v0.2.0-rc1