tree: c9eff20c4a9edc546255cb3567011d1e57410643 [path history] [tgz]
  1. cc-sample-project/
  2. BUILD
  3. docker_config.bzl
  4. docker_config.sh.tpl
  5. environments.bzl
  6. install_bazel_head.sh
  7. install_bazel_version.sh
  8. README.md
rules/README.md

Usage

This directory contains a skylark rule to generate the toolchain configs. See README.md under the root directory for the definition of toolchain configs.

For a given version of Bazel, the docker_toolchain_autoconfig rule will:

  • build the execution container image,
  • install Bazel,
  • build the container, and
  • extract the toolchain config.

Refer to the documentation in docker_config.bzl for more details of how to execute this rule and how to extract the toolchain configs.

The BUILD file in this directory contains 3 sample docker_toolchain_autoconfig targets which use Bazel 0.7.0 to generate toolchain configs for:

  • Debian8 Clang environment,
  • Ubuntu Trusty GCC environment, and
  • Ubuntu Xenial GCC environment.

Authentication

If you are generating toolchain configs for the first time, you will probably encounter permission issues. You can use docker-credential-gcr to enable docker to talk to gcr.io directly by executing the following commands:

gcloud components install docker-credential-gcr
docker-credential-gcr configure-docker