[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-01。"],[[["\u003cp\u003eCloud Builders are container images with pre-installed languages and tools, allowing you to execute specific commands within their context.\u003c/p\u003e\n"],["\u003cp\u003eYou can use any publicly available container image, specifying its URL in your configuration file's \u003ccode\u003ename\u003c/code\u003e field and the commands to run in the \u003ccode\u003eargs\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eCloud Build provides pre-built and maintained builder images, accessible via \u003ccode\u003egcr.io/cloud-builders/...\u003c/code\u003e, with source code available on GitHub.\u003c/p\u003e\n"],["\u003cp\u003eThe open-source community also contributes builders, available on the Cloud Builders Community GitHub repository, but these are not officially maintained by Cloud Build.\u003c/p\u003e\n"],["\u003cp\u003eUsers can also create custom builders, which are container images that Cloud Build can pull and run to perform any desired task within the container.\u003c/p\u003e\n"]]],[],null,["# Cloud builders\n\n**Cloud builders** are [container images](/containers) with common languages and\ntools installed in them. You can\n[configure Cloud Build](/build/docs/build-config)\nto run a specific command within the context of these builders.\n\nThis page describes the types of builders that you can use with\nCloud Build.\n\nPublicly available images\n-------------------------\n\nCloud Build enables you to use any publicly available image\nto execute your tasks. To use an image, specify the image URL in the `name` field\nin your config file. Use the `args` field to specify commands that you want to run\nwithin the image. The `args` field of a build step takes a list of arguments\nand passes them to the image referenced by the `name` field.\n| **Note:** When you pull a public container image from Docker Hub to use in your build config file, Cloud Build automatically checks the caching proxy `mirror.gcr.io` for a cached copy of the container image. If a cached copy is unavailable, Cloud Build pulls your requested image from Docker Hub and the caching proxy might cache the image for future use. For more information, see [Pull cached Docker Hub images](/artifact-registry/docs/pull-cached-dockerhub-images).\n\nThe following code snippet shows how to use the public `ubuntu` image from\n[Docker Hub](https://hub.docker.com/explore/)\nand execute a command within that image: \n\n steps:\n - name: 'ubuntu'\n args: ['echo', 'hello world']\n\nHere's another example code snippet that uses the image for Black Duck open\nsource scanner for Cloud Build from [Google Cloud console\nLauncher](https://console.cloud.google.com/launcher/browse?filter=solution-type:container): \n\n steps:\n - name: launcher.gcr.io/blackduck-public/blackducksoftware-containerbuilder-scanner\n ...\n\nFor more examples on how to use publicly available images from Docker Hub for your\ntasks, see [Building Node.js applications](/build/docs/building/build-nodejs)\nand [Building Go applications](/build/docs/building/build-containerize-go).\n| **Note:** Cloud Build runs its build steps in a Docker container. To use an image from Docker Hub, just specify the name of the image, such as `ubuntu`. To use an image from other registries, specify the full registry path of the image, such as `gcr.io/cloud-builders/gcloud`.\n\nSupported builder images provided by Cloud Build\n------------------------------------------------\n\nCloud Build provides and maintains pre-built images that\nyou can reference in your [config file](/build/docs/api/reference/rest/v1/projects.builds#buildstep)\nto execute your tasks. You can find these pre-built images in the following\nlocation: \n\n gcr.io/cloud-builders/...\n\nThe source code for these builders is available in the [cloud builders GitHub\nrepository](https://github.com/GoogleCloudPlatform/cloud-builders).\n\nFor examples on how to use supported pre-built images, see\n[Building container images](/build/docs/building/build-containers)\nand [Deploying to Cloud Run](/build/docs/deploying-builds/deploy-cloud-run).\n\nThe following table lists some examples of supported builder images:\n\nCommunity-contributed builders\n------------------------------\n\nThe Cloud Build developer community provides [open-source\nbuilders](https://github.com/GoogleCloudPlatform/cloud-builders-community)\nthat you can use to execute your tasks. Pre-built images are not available for these\nbuilders; to use these builders, download the source code from the [cloud\nbuilders community GitHub\nrepository](https://github.com/GoogleCloudPlatform/cloud-builders-community)\nand then build the image. For an example on how to build a community-contributed\nbuilder and then use it for your tasks,\nsee [Building VM images using Packer](/build/docs/building/build-vm-images-with-packer).\n\nThe following table lists some examples of community-contributed builders:\n\nCommunity-contributed builders are maintained by the open-source\ncommunity at [cloud builders\ncommunity](https://github.com/GoogleCloudPlatform/cloud-builders-community#contributing). Cloud Build does **not** officially\nmaintain these builders. For information on contributing to a builder, see the [cloud builders\ncommunity](https://github.com/GoogleCloudPlatform/cloud-builders-community#contributing)\nGitHub page.\n\nWriting your own custom builder\n-------------------------------\n\nYou can create your own **custom builder** for use in your builds. A custom\nbuilder is a container image that the Cloud Build pulls and runs with\nyour source. Your custom builder can execute any script or binary inside the\ncontainer; as such it can do anything a container can do. For instructions on\ncreating a custom builder, see [Creating custom build\nsteps](/build/docs/create-custom-build-steps).\n\nWhat's next\n-----------\n\n- Learn how to [use community-contributed builders and custom builders](/build/docs/configuring-builds/use-community-and-custom-builders).\n- Learn about the structure of a [build configuration\n file](/build/docs/build-config).\n- Learn how to use a [publicly available `node` image to build `Node.js` applications](/build/docs/building/build-nodejs).\n- Learn how to [use a pre-built `gcloud` image to deploy to Cloud Run functions](/build/docs/deploying-builds/deploy-functions).\n- Learn how to [use a community-contributed `firebase` image to deploy on Firebase](/build/docs/deploying-builds/deploy-firebase)."]]