Releases: bazelbuild/rules_docker
Numerous additions and fixes.
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 bydocker save
.container_test
rule, which allows you to test the structure of images.group_entry
andgroup_file
, modeled afterpasswd_entry
andpasswd_file
.group_entry
allows users to specify a single group.group_file
aggregates data from one or moregroup_entry
rules to produce a group file.
Features
- Added
env
,debs
, andoutput
attributes tocontainer_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 failedcontainer_
and_image
targets.
v0.3.0: container_image restructuring
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
This contains a fix to docker/contrib/push-all.bzl
.
v0.2.0: foo_image and stamping and fixes, Oh my!
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
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
This release contains assorted improvements and fixes, including:
- Better docs (the never ending struggle)
- Stamping support in
docker_bundle
anddocker_push
- A few new
contrib
features:passwd
anddocker_build
with tagging helpers. - Fix the top-level rules are broken issue (again). Now with testing!
- Workaround an argparse bug that broke '--' in
entrypoint
andcmd
. - 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
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.