Releases: bazel-contrib/rules_oci
v2.3.1
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.3.1")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "6d47e0bb9d3c269695cbb35abb603d1db08434376a1210867da8f6f4a9c630ba",
strip_prefix = "rules_oci-2.3.1",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.3.1/rules_oci-v2.3.1.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- fix: Propagate non-zero
tarexit inload.shby @Silic0nS0ldier in #881 - fix: Fix bzlmod repo resolution in oci_pull by @UebelAndre in #891
New Contributors
- @Silic0nS0ldier made their first contribution in #881
- @UebelAndre made their first contribution in #891
Full Changelog: v2.3.0...v2.3.1
v2.3.0
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.3.0")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "e987cab7a35475cb9c9060fc3f338a1fc8896c240295a3272968b217acefd0cb",
strip_prefix = "rules_oci-2.3.0",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.3.0/rules_oci-v2.3.0.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- Fix muitlarch image builds by using host architecture for jq and crane by @brianmcarey in #869
- Allow manifests without explicit
mediaTypeby @ouillie in #868 - Update CI to test bazel 8.4.2 and 7.6.2, and build with 8.4.2 by default by @mostynb in #854
- fix: Use target tar toolchain for cross-platform execution by @sfc-gh-dbieliaiev in #844
- Update platform versions in presubmit.yml by @hofbi in #875
- Add Bazel version '8.x' to BCR matrix by @hofbi in #876
- ci: fix presubmit by @thesayyn in #873
- ci: Add conventional commits check by @hofbi in #877
- fix: mark oci extension as reproducible if all pulls are reproducible by @ashi009 in #882
- feat: add package metadata with PURL to oci_pull by @stevebarrau in #883
- fix: select when exec is windows by @thesayyn in #886
- build: Rebased from #842 — original work by @mostynb - Upgrade aspect_bazel_lib 2.7.2 -> 2.21.1 by @GenFlogi in #888
New Contributors
- @brianmcarey made their first contribution in #869
- @ouillie made their first contribution in #868
- @mostynb made their first contribution in #854
- @hofbi made their first contribution in #875
- @ashi009 made their first contribution in #882
- @stevebarrau made their first contribution in #883
- @GenFlogi made their first contribution in #888
Full Changelog: v2.2.7...v2.3.0
v2.2.7
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.2.7")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "b8db7ab889d501db33313620b2c8040dbb07e95c26a0fefe06004b35baf80e08",
strip_prefix = "rules_oci-2.2.7",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.7/rules_oci-v2.2.7.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- fix(publish): pick up secret when passed from caller workflow by @alexeagle in #793
- refactor: upgrade tools pattern to direnv by @alexeagle in #807
- Add missing dependency to //cosign:defs by @smertnik3sh in #810
- chore(docs): stop recommending pkg_tar by @alexeagle in #808
- docs(multiarch): add README to multiarch example by @calmette54 in #806
- chore: move migration guide from aspect docsite. by @alexeagle in #813
- chore(ci): setup aspect workflows by @alexeagle in #814
- fix: correct bzl_library targets by @alexeagle in #812
- Fix static content example by @fwalch in #818
- feat(oci.pull): support registry and repository attributes by @abhinav in #828
- feat(oci): make repository attribute optional in oci_push (#822) by @arubegonsan in #823
- feat(cosign): make repository attribute optional in cosign rules by @arubegonsan in #824
- oci_load: allow loader to be a target label by @dmivankov in #820
- style: fix typo in authn.bzl
www_authh->www_authby @zachburg in #830 - fix: Allow credsStore and credHelpers to fail in some cases by @srdo-humio in #817
- fix: don't use version 0.0.0 by @alexeagle in #834
- fix: don't use version 0.0.0 by @alexeagle in #833
- fix: Handle non-legacy external runfiles layout in oci_load by @sfc-gh-dbieliaiev in #838
- docs: mention rules_buildx by @thesayyn in #843
- chore: Upgrade cosign to latest 2.x version by @honnix in #848
- build: Update bazel_skylib dependency by @jaqx0r in #829
- fix: update the complete example to use oci_load instead of oci_tarball by @oxmo456 in #849
- fix: Use rlocation for runfiles in push script by @contagnas in #804
- docs: Update README.md for rules_img by @alexeagle in #862
- Suppress regctl stderr in image.sh by @cjm-dd in #863
- Remove check for repository attribute to allow passing it as flag by @mering in #859
- Fix token overwritten by empty access_token field (fixes #801) by @WnP in #856
- support nerdctl (containerd) by @peakschris in #851
- fix: deduplicate blobs when downloading by @thesayyn in #871
New Contributors
- @smertnik3sh made their first contribution in #810
- @calmette54 made their first contribution in #806
- @fwalch made their first contribution in #818
- @abhinav made their first contribution in #828
- @arubegonsan made their first contribution in #823
- @zachburg made their first contribution in #830
- @srdo-humio made their first contribution in #817
- @sfc-gh-dbieliaiev made their first contribution in #838
- @jaqx0r made their first contribution in #829
- @oxmo456 made their first contribution in #849
- @contagnas made their first contribution in #804
- @cjm-dd made their first contribution in #863
- @WnP made their first contribution in #856
- @peakschris made their first contribution in #851
Full Changelog: v2.2.6...v2.2.7
v2.2.6
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.2.6")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "5994ec0e8df92c319ef5da5e1f9b514628ceb8fc5824b4234f2fe635abb8cc2e",
strip_prefix = "rules_oci-2.2.6",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.6/rules_oci-v2.2.6.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- refactor: publish better buildx api by @thesayyn in #788
- example: use docker tarball as base image by @thesayyn in #789
- image_index.sh.tpl: use "dirname" from COREUTILS by @dmivankov in #790
- chore: use new Publish-to-BCR by @alexeagle in #792
New Contributors
- @dmivankov made their first contribution in #790
Full Changelog: v2.2.5...v2.2.6
v2.2.5
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.2.5")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "361c417e8c95cd7c3d8b5cf4b202e76bac8d41532131534ff8e6fa43aa161142",
strip_prefix = "rules_oci-2.2.5",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.5/rules_oci-v2.2.5.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)Full Changelog: v2.2.4...v2.2.5
v2.2.3
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.2.3")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "1e7759852e8cad966ca793412d292f1d4af5831940fb2cb573f1890ad1e9641e",
strip_prefix = "rules_oci-2.2.3",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.3/rules_oci-v2.2.3.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- Add --use --bootstrap to dockerfile builder example by @vinnybod in #775
- authn: allow builtin credential handling to fail conditionally by @malt3 in #778
Full Changelog: v2.2.2...v2.2.3
v2.2.2
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.2.2")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "8676144f96dd63294333906b26dea2388f61cadaf1dea59a225e7dbc52cc72fa",
strip_prefix = "rules_oci-2.2.2",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.2/rules_oci-v2.2.2.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- refactor: remove workspace by @alexeagle in #767
- fix: drop embedded config data from manifest image by @plobsing in #774
Full Changelog: v2.2.1...v2.2.2
v2.2.1
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.2.1")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "cfea16076ebbec1faea494882ab97d94b1a62d6bcd5aceabad8f95ea0d0a1361",
strip_prefix = "rules_oci-2.2.1",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.1/rules_oci-v2.2.1.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- Fix compatibilty with symbolic macros by @dzbarsky in #759
- Handle not-logged-in public repos with credsStore by @fahhem in #731
New Contributors
Full Changelog: v2.2.0...v2.2.1
v2.2.0
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.2.0")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "1bd16e455278d523f01326e0c3964cd64d7840a7e99cdd6e2617e59f698f3504",
strip_prefix = "rules_oci-2.2.0",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.0/rules_oci-v2.2.0.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- use compression in examples by @pdeva in #718
- Add a plus sign to the output_groups option by @lexspoon in #707
- refactor: remote_tags unnecessarily restrictive by @thesayyn in #726
- Update scala.md: oci_tarball was renamed by @alexeagle in #728
- doc: cover the inline-specified variants of arguments to oci_image by @plobsing in #705
- fix: pass global args to all crane invocations by @ahans in #709
- Introduce new attribute on
oci_imageforcreateddatetime by @hanneskaeufler in #724 - Fix macOS CI after #724 by @hanneskaeufler in #730
- feat: Possible to skip cosign toolchains registration by @honnix in #733
- chore: upgrade regctl by @alexeagle in #744
- chore(cd): automate release tagging by @alexeagle in #745
- chore(ci): disable two failing tests by @alexeagle in #747
- chore: fix tag name when called by workflow by @alexeagle in #749
- feat: Transition oci_image_index into a macro with additional [name].digest target by @mislavmandaricaxilis in #742
New Contributors
- @pdeva made their first contribution in #718
- @lexspoon made their first contribution in #707
- @ahans made their first contribution in #709
- @hanneskaeufler made their first contribution in #724
- @honnix made their first contribution in #733
- @mislavmandaricaxilis made their first contribution in #742
Full Changelog: v2.0.1...v2.2.0
v2.0.1
Using bzlmod with Bazel 6 or later:
-
Add
common --enable_bzlmodto.bazelrc. -
Add to your
MODULE.bazelfile:
bazel_dep(name = "rules_oci", version = "2.0.1")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Declare external images you need to pull, for example:
oci.pull(
name = "distroless_base",
# 'latest' is not reproducible, but it's convenient.
# During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
# values which you can use here in place of 'tag' to pin for reproducibility.
tag = "latest",
image = "gcr.io/distroless/base",
platforms = ["linux/amd64"],
)
# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_oci",
sha256 = "acbf8f40e062f707f8754e914dcb0013803c6e5e3679d3e05b571a9f5c7e0b43",
strip_prefix = "rules_oci-2.0.1",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.0.1/rules_oci-v2.0.1.tar.gz",
)
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
oci_register_toolchains(name = "oci")
# You can pull your base images using oci_pull like this:
load("@rules_oci//oci:pull.bzl", "oci_pull")
oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
"linux/arm64",
],
)What's Changed
- fix: declare and register regctl toolchains only for compatible platforms by @lbcjbb in #692
- doc: mention containerd requirement by @thesayyn in #694
- chore: bump to stardoc 0.6.2 by @gregmagolan in #719
Full Changelog: v2.0.0...v2.0.1