Skip to content

Releases: bazelbuild/rules_docker

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

16 Aug 19:31

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.

Numerous additions and fixes.

10 Feb 00:33

Choose a tag to compare

Breaking Changes (BUILD files will require updating)

Introduced a new passwd_entry rule that builds a data structure representing a single user. Rewrote passwd_file, to source data from passwd_entry rules rather than from attributes directly. This allows to create a multi-user passwd files.

New rules: group_entry and group_file, modeled after passwd_entry and passwd_file. group_entry allows to specify a single group. group_file aggregates data from one or more group_entry rules to produce a group file.

List available fields explicitly in GroupFileContentProvider and PasswdFileContentProvider.
Documentation for provider fields: https://docs.bazel.build/versions/master/skylark

New Rules

  • {scala, groovy, rust, d, py3, nodejs}_image
  • {oci, docker, container}_load to unpack tarballs, e.g. those generated by docker save.
  • container_test rule, which allows you to test the structure of images.
  • group_entry and group_file, modeled after passwd_entry and passwd_file. group_entry allows users to specify a single group. group_file aggregates data from one or more group_entry rules to produce a group file.

Features

  • Added env, debs, and output attributes to container_image rule.
  • Added support for the scala provider in java_image.
  • Added binary attribute to <lang>_image targets, to specify a binary target to use instead of generating one.

Fixes

  • Allow uncompressed layers in container_import.
  • Fixed erroneous 0 exit codes on failed container_ and _image targets.

v0.3.0: container_image restructuring

28 Sep 18:52

Choose a tag to compare

This release includes a major restructuring of the repository, which may break some imports.

For importing contrib rules, you should drop the docker/ prefix. If you were using lang_image rules, these are now top-level rules. This is part of a restructuring to reflect the aspirational format-agnosticism of our intermediate format.

This release introduces early support for publishing OCI images.

v0.2.1: Fixes push-all.bzl

23 Sep 18:24

Choose a tag to compare

This contains a fix to docker/contrib/push-all.bzl.

v0.2.0: foo_image and stamping and fixes, Oh my!

22 Sep 18:25

Choose a tag to compare

This release contains assorted fixes (e.g. labels weren't working properly).

This release introduces support for stamping various elements of the docker_build rules, e.g. the value of labels with stamp variables like {BUILD_USER}.

This release also introduces some new rules under contrib that enable you to take {cc,go,java,py}_binary rules and turn them into Docker images by simply using {cc_go,java,py}_image instead. These rules can be used everywhere a docker_build rule can be used (e.g. docker_push or the constructs in rules_k8s).

v0.1.0: New and Improved Intermediate Format

31 Jul 15:51

Choose a tag to compare

This release introduces a new intermediate format for docker_build, which does not rely on the docker save format (unless you bazel run or build :foo.tar). You can see the gory details in intermediate-form.md, but the performance of docker_pull => docker_build => docker_push should improve considerably because we avoid the unnecessary roundtrips to the docker save form.

To benefit from this, make sure you avoid @foo//image:image.tar or //my/build:label.tar references, opting for: @foo//image or //my/build:label references instead.

The goal of this release was to dramatically improve the cycle times for edit/rebuild/repush and no-edit/rebuild/repush. With this release, we are able to demonstrate edit cycle times of <5 seconds across several Bazel languages.

v0.0.2: Improvements and Fixes

22 Jun 18:12

Choose a tag to compare

This release contains assorted improvements and fixes, including:

  • Better docs (the never ending struggle)
  • Stamping support in docker_bundle and docker_push
  • A few new contrib features: passwd and docker_build with tagging helpers.
  • Fix the top-level rules are broken issue (again). Now with testing!
  • Workaround an argparse bug that broke '--' in entrypoint and cmd.
  • Remove support for Docker <1.10 (beginning of some broader cleanup)
  • Performance improvements via google/containerregistry

A lot of the changes in this release were in support of (shameless plug) distroless.

v0.0.1: Initial Release

05 May 18:59

Choose a tag to compare

This marks the initial release of the new rules_docker, which subsumes docker_build and docker_bundle from the Bazel Core repository.

This repository also introduces docker_pull and docker_push to allow full-cycle Docker image development without needing Docker installed locally.