Cloud builders

Cloud builders are container images with common languages and tools installed in them. You can configure Cloud Build to run a specific command within the context of these builders.

This page describes the types of builders that you can use with Cloud Build.

Publicly available images

Cloud Build lets you use any publicly available image to execute your tasks. To use an image, specify the image URL in the name field in your config file. Use the args field to specify commands that you want to run within the image. The args field of a build step takes a list of arguments and passes them to the image referenced by the name field.

The following code snippet shows how to use the public ubuntu image from Docker Hub and execute a command within that image:

steps:
- name: 'ubuntu'
  args: ['echo', 'hello world']

Here's another example code snippet that uses the image for Black Duck open source scanner for Cloud Build from Google Cloud console Launcher:

steps:
- name: launcher.gcr.io/blackduck-public/blackducksoftware-containerbuilder-scanner
  ...

For more examples on how to use publicly available images from Docker Hub for your tasks, see Building Node.js applications and Building Go applications.

Supported builder images provided by Cloud Build

Cloud Build provides and maintains prebuilt images that you can reference in your config file to execute your tasks. You can find these prebuilt images in the following location:

gcr.io/cloud-builders/...

The source code for these builders is available in the cloud builders GitHub repository.

For examples on how to use supported prebuilt images, see Building container images and Deploying to Cloud Run.

The following table lists some examples of supported builder images:

Builder Name Example
bazel gcr.io/cloud-builders/bazel bazel example