Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Releases: bazelbuild/rules_docker

Switch rules_docker to go-containerregistry

07 Oct 14:00
Compare
Choose a tag to compare

Features

  • All rules now use github.com/google/go-containerregistry instead of github.com/google/containerregistry (#1142)

Fixes

  • register toolchain only for container exec and use it in py*_image (#1173)
  • Update dependency in_gopkg_yaml_v2 to v2 (#1172)
  • Sync in go-containerregistry update & update test digests (#1171)
  • Update io_bazel_rules_scala commit hash to 63cb47f (#1170)
  • Remove max permsize which is not recommended for JDK 11 (#1169)
  • Update io_bazel_rules_rust commit hash to 55f7701 (#1167)
  • fix json print command for py3 (#1166)
  • Update io_bazel_rules_scala commit hash to 177e2ee (#1163)
  • Generate v1 image tarballs in Go join_layers (#1162)
  • Update README.md to remove unnecessary part of instruction. (#1161)
  • continue migrating to use of ctx.actions.args (#1160)
  • More use ctx args (#1159)
  • Revert "more use ctx.args" (#1158)
  • more use ctx.args (#1157)
  • use ctx.args in image.bzl (#1156)
  • update pin to base images docker and bazel-toolchains (#1153)
  • More performance fixes (#1152)
  • Update dependency com_github_kylelemons_godebug to v1 (#1151)
  • Update README for release v0.10.1 (#1149)

Numerous additions & fixes

16 Sep 16:25
Compare
Choose a tag to compare

Fixes

  • Implement Get function for struct of type Value (#1147)
  • Migrate metadata package rules from bazel-toolchains (#1144)
  • Test more on Mac (#1143)
  • use gcp-runtimes image in security check test as we do have permissions to access the base of that one for security check purposes (#1141)
  • Switch container_pull & container_load to Go implementation (#1140)
  • Update readme for release v0.10.0 (#1138)

Numerous additions & fixes

10 Sep 12:29
c3f19ac
Compare
Choose a tag to compare

Fixes

  • Update go-containerregistry that reverts API breaking change (#1137)
  • Update dependency io_bazel_rules_go to v0.19.4 (#1136)
  • Update dependency bazel_toolchains to v0.29.1 (#1135)
  • Update rules_python commit hash to 54d1cb3 (#1134)
  • Update io_bazel_rules_scala commit hash to f4a24fe (#1133)
  • Simplify image non repro test (#1132)
  • Update go-containerregistry to pull in tarball foreign layer support (#1131)
  • Use the new puller binaries & deprecate format attribute in puller (#1129)
  • Refactor puller & loader to directly generate legacy format. (#1128)
  • new_pull: expose puller_darwin and _linux attr for testing (#1124)
  • Refactor image reader used in Go binaries fixing foreign layer, tarball loading and avoiding digest recomputation (#1123)
  • Implement a container flattener in Go (#1122)
  • Update io_bazel_rules_rust commit hash to f727669 (#1120)
  • Make pusher & digester backwards compatible. (#1118)
  • Add Button to list of users (#1117)
  • Enable specifying a tag for the checker image in configs_test (#1115)
  • Add a flag to control pushing new tags on unchanged images (#1112)
  • Implement join_layers.py in Go (#1111)
  • Update dependency bazel_toolchains to v0.29.0 (#1108)
  • Update dependency bazel_gazelle to v0.18.2 (#1107)
  • Update rules_groovy pin (#1101)
  • Add xz to default toolchain again (#1100)
  • Update openjdk gpg file sha256 (#1099)
  • Update dependency io_bazel_rules_go to v0.19.3 (#1098)
  • Update subpar commit hash to 9fae6b6 (#1097)
  • Update rules_python commit hash to 9d68f24 (#1096)
  • Revert "Add (again) xz_path to default toolchain"" (#1092)
  • Update readme with new download instructions (#1091)
  • Add (again) xz_path to default toolchain" (#1088)
  • Revert "Add xz_path to default toolchain" (#1086)
  • Add xz_path to default toolchain (#1084)
  • README.md: add the K8s Container Image Promoter to adopters (#1082)
  • Update OWNERS (#1081)
  • Update CODEOWNERS (#1080)
  • Update dependency bazel_toolchains to v0.28.5 (#1078)
  • Update io_bazel_rules_scala commit hash to 8a5ca6b (#1077)
  • Update io_bazel_rules_rust commit hash to 05bd7d1 (#1076)
  • Clarify when not to use custom pull rule (#1074)
  • clarify docs for use of client_config (#1073)
  • change exec -> executable as var name (#1071)
  • Fix typo in links (#1070)
  • update base images (#1069)
  • Add documentation for new_container_push (#1067)
  • Add documentation for new_container_pull (#1066)
  • Add digest test for new puller (#1065)
  • Update image.bzl to optionally utilize new createImageConfig Go binary (#1063)
  • Implement createImageConfig for use in container_image targets (#1062)
  • Add image digest in new puller starlark rule (#1061)
  • Updated new puller binary to generate digest file (#1060)
  • Revert digester deps for container_push and container_image (#1058)
  • Fix semantic test failure in CI (#1057)
  • Escape backslashes in Starlark code (#1056)
  • Update dependency bazel_toolchains to v0.28.3 (#1055)
  • Update subpar commit hash to 2917d27 (#1054)
  • Update rules_python commit hash to 4b84ad2 (#1053)
  • Update io_bazel_rules_scala commit hash to 17892bf (#1052)
  • Deprecate indeterminism detector (#1050)
  • Remove java pkg non-determinism test (#1048)
  • Use the default shell for docker commands (#1047)
  • Refactor legacy image formats to not generate symlinks (#1046)
  • upgrade gazelle and fix issue with one of the samples (#1045)
  • Add utils.bzl to bzl_library (#1044)
  • Change new pusher tests path (#1043)
  • Issue 1022 update readme with details on known issue (#1042)
  • Update README with instructions for release v0.9.0 (#1041)

v0.9.0: Numerous Additions and Fixes

31 Jul 18:16
07a636f
Compare
Choose a tag to compare

New Rules

  • Add a test rule to syntax check file update & dependency update spec (#1017)
  • Allow testing for image non-determinism (#1006)
  • migrating security check to rules_docker (#977)

Fixes

  • Move basic image repro tests to GCB (#1040)
  • Changed pusher default format to legacy (#1039)
  • Fix rules_python workspace name (#1036)
  • Specifying a file update or dep spec YAML is optional to configs_test (#1034)
  • Update io_bazel_rules_go commit hash to 4c28450 (#1033)
  • Update dependency bazel_toolchains to v0.28.2 (#1031)
  • Update io_bazel_rules_rust commit hash to 949b5d6 (#1030)
  • Update io_bazel_rules_go commit hash to 4bccd37 (#1028)
  • docker/util: adding arg docker_run_flags to container_run_and_commit (#1027)
  • Replace syntax checker with single tester for configs. (#1025)
  • remove note about Windows support (#1021)
  • Add image digest output for new pusher (#1020)
  • Add method needed for internal go flags implementation (#1018)
  • Update io_bazel_rules_python commit hash to 640e88a (#1015)
  • Update dependency bazel_toolchains to v0.28.1 (#1014)
  • Update io_bazel_rules_rust commit hash to c06ab74 (#1012)
  • Add e2e tests to check new_pusher compatibility (#1011)
  • Fix last incorrect use of python in //docker/util/... (#1009)
  • Use distroless/static base for go containers when pure is "on" (#1005)
  • Test container repro test in gcb (#1003)
  • Fix python use in new docker/... rules (#1002)
  • use docker toolchains in docker/package_manager and docker/util rules (#1001)
  • Remove required node_modules arg and layers (#1000)
  • Update new pusher to consume container_image output (#999)
  • Update io_bazel_rules_go commit hash to b2968ca (#996)
  • update rules scala and fix test (#995)
  • Fix a couple of issues that made new security_check different (#994)
  • Update dependency bazel_toolchains to v0.28.0 (#993)
  • Update io_bazel_rules_python commit hash to 3886b1a (#990)
  • Update io_bazel_rules_go commit hash to 0303b3a (#989)
  • Adjust to OutputGroupInfo (#988)
  • Fix a typo in toolchain_container's README (#983)
  • turn on more mac tests (#982)
  • Migrate toolchain_container rules to rules_docker (#981)
  • Pin containers that are used for digest tests. (#980)
  • Enable using Darwin binary. (#975)
  • Refactor new_container_pull to generate fully backward compatible format (#974)
  • Fix error message in pusher (#972)
  • Release Darwin binaries for puller and loader. (#971)
  • Refactor package_managers from base-images-docker to this repo (#970)
  • Implement extractConfig binary in Go (#967)
  • Added more e2e tests for new_container_push to account for legacy format (#966)
  • Add DO_NOT_IMPORT blocks to make copybara transformation easier. (#965)
  • Update io_bazel_rules_rust commit hash to 3cd4c63 (#963)
  • Update dependency bazel_toolchains to v0.27.1 (#962)
  • Update io_bazel_rules_groovy commit hash to d3b1b86 (#961)
  • Update new puller binary (#960)
  • Refactor puller binary to be compatible with container_import (#958)
  • container_repro_test rule to test for container reproducibility (#955)
  • Implement new interface for legacy intermediate format layouts (#954)
  • Update README.md (#953)
  • Add symlink and new file structure to loader.go binary (#951)
  • Add bzl_library for lang/image.bzl (#949)
  • Add container_tests for puller and Update load and pull rules to comply with updates in #946 (#948)
  • Add symlink to puller's OCI intermediate format (#946)
  • Update io_bazel_rules_scala commit hash to 8092d5f (#944)
  • refactor tests/docker -> tests/container (#942)
  • Even more tests moved to GCB from e2e (#941)
  • Move more e2e tests to GCB (#939)
  • migrating content from e2e.sh to separate, more granular, GCB builds (#938)
  • Update release notes for 0.8.1 (#937)

Patch release adding convenient macro to import Go dependencies

27 Jun 14:49
Compare
Choose a tag to compare

Major fixes

  • refactor go dependencies to a separate bzl file (#936)

New Rules

  • Add new Starlark container load rule new_load.bzl (#929)

Features

  • Implement new loader.go binary (#928)

Other Fixes

  • Fix Bazel race condition in go binary release job. (#932)
  • Add tests for new container_push (#931)
  • Add loader to GCB release job. (#930)
  • Clarify end user details for war_image macro (#926)
  • Update docs with v0.8.0 release (#925)

v0.8.0: Numerous Additions and Fixes

24 Jun 20:25
Compare
Choose a tag to compare

Breaking Changes

  • Fail when pulled image with unexpected sha256 (#743) (#734)

  • Return providers instead of struct from rule impl functions (#755)

    IMPORTANT
    This PR changes the return value type in some rule implementation functions from struct to a list of providers.
    No action is required if you are already using the providers returned by the below mentioned rules as described here (e.g. target[ProviderName].fieldName).

    Your action may be required if you are using either the implementation function or any targets of the following rules (in your own rule implementation functions or macros):

    • container_bundle (in container/bundle.bzl)
    • container_image (in container/image.bzl)
    • container_import (in container/import.bzl)
    • filter_layer (in lang/image.bzl)

    Actions Required by Rule

    • container_bundle
      If you use the container_images and/or the stamp field of the returned struct, then get these fields from the returned BundleInfo provider as shown here.
    • container_image
      If you use the container_parts field of the returned struct, then get this field from the returned ImageInfo provider as shown here.
    • container_import
      If you use the container_parts field of the returned struct, then get this field from the returned ImportInfo provider (e.g. target[ImportInfo].container_parts instead of target.container_parts)
    • filter_layer
      If you use the py field of the returned struct as target.py, then get this field using the returned PyInfo provider as target[PyInfo].

    Note
    If you access the returned providers with the following syntax:
    target.providers[<index>].<field>
    then you most likely need to change this to:
    target[<index>].<field>

New Rules

  • Repo rule to build an image from Dockerfile and save as tar (#737)

Features

  • Support using Kaniko to build images. (#902)
  • Add feature to pass --build-arg to dockerfile_image rule. (#828)
  • Add support for host driver in container_test (#818)
  • Allow passwd entry with non-existing home path (#757)
  • nodejs_image: Allow passing in custom binary (#701)
  • Publish an image.digest file for container_pull (#711)
  • Containerregistry cached (#706)
  • container_push: added attribute 'tag_file' (#691)
  • expand make variables in env field (#670) (#672) (#678)

Dockerfile Examples

  • Dockerfile vs java_image example (#797)
  • Add Dockerfile example that handles an arbitrary RUN instruction (#796)
  • Add dockerfile example that uses the RUN instruction (#750)
  • Extended dockerfile example (#749)
  • Basic Dockerfile vs container_image example (#740)

Documentation

  • Update doc about new examples (#898)
  • test use of incompatible_use_python_toolchains flag with Bazel 0.25.0 (#826)
  • Go image doc update (#690) (#730)
  • Add new adopters section for rules_docker (#687) (#688) (#692)
  • Toolchain auth docs (#686)
  • Update container_bundle and container_push doc to remark deprecation of "stamp" attribute (#674)

Fixes

  • Add better error message when tar is used in container_test docker mode. (#905)
  • Fix input that should be tool. (#900)
  • Expose attributes from lang/image.bzl as struct (#876)
  • Remove reference to cache which doesn't exist in internal codebase (#880)
  • Fix incremental loader cleanup when no run statements are defined (#875)
  • container_test verbose should drive verbosity (#864)
  • Fix for Bazel upcoming change incompatible_string_join_requires_strings (#840)
  • Mark Python binaries with explicit python_version. (#821)
  • modify how stamp-info-file is calculated (#819)
  • Add cleanup before docker run in incremental loader (#793)
  • legacy_run_behavior value shouldn't be taken from base (#773) (#769)
  • Create empty workspace directory to fix using python deps as layers (#161) (#747)
  • Fix Bazel incompatible issues (#716) (#712)
  • Use internally downloaded six and disable legacy_create_init (#696)
  • Set default_mtime=0 on TarFileWriter so that elements default to the epoch (#695)
  • Split py_binary into py_binary and py_library to avoid having py_binary in deps (#677)
  • go_image() now respects restricted_to and compatible_with (#669)
  • Attempt to use python2 first (#653) (#655)
  • Pipe through testonly to allow building tests as an image (#671) (#666)
  • exec docker run statement (#667)
  • Fix invalid container ref characters in names (#664)

v0.7.0: Restructure rules_docker dependency loading (#652)

14 Jan 18:41
Compare
Choose a tag to compare

Features

  • Extract transitive dependency defs of rules_docker from container/container.bzl file into a separate file repositories/repositories.bzl. This allows rules loaded in container/container.bzl to use non-Bazel native rules, such as rules from bazel_skylib.

    This change affects how people currently load rules_docker dependencies and rules. For example, to use container_pull rule, in the WORKSPACE, users now need to do:

    load(
        "@io_bazel_rules_docker//repositories:repositories.bzl",
        container_repositories = "repositories",
    )
    container_repositories()
    
    load(
        "@io_bazel_rules_docker//container:container.bzl",
        "container_pull",
    )

    instead of

    load(
        "@io_bazel_rules_docker//container:container.bzl",
        "container_pull",
        container_repositories = "repositories",
    )
    
    container_repositories()

    For more details, please refer to README.md.

  • Use incremental loader in container_test (#639)

  • Use xz in toolchain (#636)

  • Include custom runfile symlinks in layers (#630)

  • Make obtainer build user in tests remote execution compatible (#642)

  • Support '=' character in path names (#631)

Fixes

  • Fix Bazel incompatible issues. (#648)
  • Fix container bundle pusher broken by #591 (#651)

v0.6.0: Docker toolchain rule & configuration repository rule

18 Dec 16:09
e29affb
Compare
Choose a tag to compare

New Rules

  • docker_toolchain rule to define a custom docker toolchain
  • toolchain_configure repository rule to configure the docker_toolchain rule with custom attributes.

Features

  • Custom docker client configuration for container_pull & container_push rules using the toolchain_configure rule.
  • container_pull: return the resolved digest to bazel and support overriding platform.
  • Incremental loading in the container_image rule uses the new docker toolchain rule to get the path to the docker executable.
  • Expose docker run info in container_image rule. (#505)

Fixes

  • container_pull: return the resolved digest to bazel and support overriding platform.
  • Add 'digest' field to PushInfo provider.
  • Replace "url" with "urls" in invocations of http_archive rule.
  • Fix bazel run image arg duplication (#374) (#586).
  • Update rules_go to 0.16.0 (#550).
  • Fix runfiles discovery (#522).
  • Improve py_image layering (#324).
  • Pass through tags to targets created by java_image (#534).
  • Update Authentication section. (#533)
  • Respect tags attribute for all rules in scala_image (#527)
  • Java data runfiles (#530)
  • join_layers read blobs as binary (py3 support) (#528)
  • Image digest output for container_image rule (#445)
  • Fix an import bug in py3_image.py. (#502)
  • null_entrypoint bug fix. (#504)

Fix issue related to re-cut of Bazel 0.17.0rc1

22 Aug 23:51
Compare
Choose a tag to compare

The change to add windows support added a temporary dependency on bazel 0.17.0rc1. This rc was re-cut today (a very uncommon event) making release 0.5.0 broken.
This release should be used instead of 0.5.0

v0.5.0: Adding Basic Support for Windows Docker Images (#493)

16 Aug 19:31
Compare
Choose a tag to compare

This release was broken due to a change in Bazel 0.17.0rc1. Please use v0.5.1

New Rules

  • New container_layer rule Each container_layer rule will create its own tar files. container_image rule was refactored so that it can composed by multiple container_layers via such new attr.
  • Add rename_image macro
  • Add compare_ids_test to compare the ids of two docker images

Features

  • Added capability to add empty directories to a container image
  • Support the args attribute on app image rules
  • Base and outputs are exposed to be overriden.
  • Allow for users to declare explicit build timestamps
  • Use lzma to decompress .tar.xz debian files.
  • Properly set cmd and entrypoint to null when needed.
  • Adding Basic Support for Windows Docker Images

Fixes

  • The lang image rules like go_image now propagate tags
  • Updated nodejs_image to work with new rules_nodejs
  • Fixed data_path for files in external repositories
  • Fixed workdir and expand arg location.
  • Fixed nodejs_image args.
  • Fix builds with python3 as default python.