Skip to content

Latest commit

 

History

History
 
 

toolchain_container

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Bazel toolchain container rules

Rules in this directory provide functionality to build toolchain_containers. These are containers made up of language_tool_layers. Each language_tool_layer produces a container_image with a set of debian packages installed. A language_tool_layer can define any attributes of a container_image. Note these rules depend on docker/package_managers rules which in turn require a docker binary to be present and configured properly via docker toolchain rules.

Toolchain container macros

language_tool_layer

language_tool_layer(kwargs)

A wrapper around attrs in container_image, download_pkgs and install_pkgs rules.

Downloads and installs debian packages using https://github.com/GoogleCloudPlatform/base-images-docker/tree/master/package_managers, and configures the rest using https://github.com/bazelbuild/rules_docker#container_image-1.

Parameters

kwargs optional.

Same args as https://github.com/bazelbuild/rules_docker#container_image-1 minus: debs: debian packages should be listed in 'packages', or be included in 'installables_tar' as .deb files. plus: packages: list of packages to fetch and install in the base image. additional_repos: list of additional debian package repos to use, in sources.list format. keys: list of labels of additional gpg keys to use while downloading packages. installables_tar: a tar of debian packages to install in the base image. installation_cleanup_commands: cleanup commands to run after package installation.

toolchain_container

toolchain_container(kwargs)

Composes multiple language_tool_layers into a single resulting image.

A toolchain_container is a container_image composed from multiple language_tool_layer targets. Each language_tool_layer target can install a list of debian packages.

If installables_tar is specified in the toolchain_container rule, then packages or installables_tar specified in any of the language_layers passed to this toolchain_container rule will be ignored.

Parameters

kwargs optional.

Same args as https://github.com/bazelbuild/rules_docker#container_image-1 minus: debs: debian packages should be listed in `packages`, or be included in `installables_tar` as .deb files. plus: language_layers: a list of language_tool_layer. installables_tar: a tar of debian packages to install in the base image. packages: list of packages to fetch and install in the base image. additional_repos: list of additional debian package repos to use, in sources.list format. keys: list of labels of additional gpg keys to use while downloading packages. installation_cleanup_commands: cleanup commands to run after package installation.