This folder contains artifacts for building a docker container which includes all necessary language toolchains (C++, Java, Python, Go and libraries). This container is the recommended toolchain container for Remote caching and execution with Bazel.
Download and install the Google Cloud SDK, which includes the gcloud command-line tool.
Create a new Google Cloud Platform project from the Cloud Console or use an existing one.
Initialize the Cloud SDK.
gcloud init
Authenticate docker
to talk to gcr.io
by following the instructions here.
You will need a valid project ID to build the toolchain-container.
You can build a toolchain-container with ubuntu16-04 as the base container by running:
container/build.sh -p my-project-id -d ubuntu16_04 -c rbe-ubuntu16-04 -t latest -b my-gcs-bucket
Congratulations! Your docker container is now available in Container Registry
gcr.io/my-project-id/rbe-ubuntu16-04:latest
You can pull the built container to local
gcloud docker -- pull gcr.io/my-project-id/rbe-ubuntu16-04:latest
You can also build rbe-ubuntu16-04 container locally to for a quick test. You would need Bazel and Docker installed.
Run the following command:
container/build.sh -l -d ubuntu16_04
You docker container is now available locally and you can try it out by running:
docker run -it rbe-ubuntu16-04:latest /bin/bash