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 enables you to use any publicly available image
to execute your tasks. To use an image, specify the image URL in the
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
The following code snippet shows how to use the public
ubuntu image from
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 pre-built images that you can reference in your config file to execute your tasks. You can find these pre-built images in the following location:
The source code for these builders is available in the cloud builders GitHub repository.
For examples on how to use supported pre-built images, see Building container images and Deploying to Cloud Run.
The following table lists some examples of supported builder images:
|The complete list of supported builders for Cloud Build.|
The Cloud Build developer community provides open-source builders that you can use to execute your tasks. Pre-built images are not available for these builders; to use these builders, download the source code from the cloud builders community GitHub repository and then build the image. For an example on how to build a community-contributed builder and then use it for your tasks, see Building VM images using Packer.
The following table lists some examples of community-contributed builders:
||Runs integration tests on docker images.|
||Executes your build step on a configurable Compute Engine VM.|
||Automates the creation of machine images using Packer|
||Manages Kubernetes packages using Helm.|
||Executes your build step using the specified Cloud Native Buildpack.|
||Executes your build step using kaniko.|
|The complete list of community-contributed builders for Cloud Build.|
Community-contributed builders are maintained by the open-source community at cloud builders community. Cloud Build does not officially maintain these builders. For information on contributing to a builder, see the cloud builders community GitHub page.
Writing your own custom builder
You can create your own custom builder for use in your builds. A custom builder is a container image that the Cloud Build pulls and runs with your source. Your custom builder can execute any script or binary inside the container; as such it can do anything a container can do. For instructions on creating a custom builder, see Creating custom build steps.
- Learn how to use community-contributed builders and custom builders.
- Learn about the structure of a build configuration file.
- Learn how to use a publicly available
nodeimage to build
- Learn how to use a pre-built
gcloudimage to deploy to Cloud Functions.
- Learn how to use a community-contributed
firebaseimage to deploy on Firebase.