[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-18 UTC。"],[[["\u003cp\u003eDataflow pipelines using Runner v2 support the use of custom container images to customize the runtime environment of user code.\u003c/p\u003e\n"],["\u003cp\u003eBy default, Dataflow pipelines use prebuilt Apache Beam images, but users can specify their own custom container images for their Dataflow jobs.\u003c/p\u003e\n"],["\u003cp\u003eCustom containers allow users to preinstall pipeline dependencies, including those not in public repositories, and to manage dependencies when access to public repositories is restricted.\u003c/p\u003e\n"],["\u003cp\u003eUsing custom containers also allows you to prestage large files and launch third-party software to customize the execution environment.\u003c/p\u003e\n"],["\u003cp\u003eThe main use cases of custom containers are to reduce worker start time, customize the environment, and to manage dependencies.\u003c/p\u003e\n"]]],[],null,["You can customize the runtime environment of user code in Dataflow\npipelines by supplying a custom container image. Custom containers are\nsupported for pipelines that use Dataflow\n[Runner v2](/dataflow/docs/runner-v2).\n\nWhen Dataflow starts up worker VMs, it uses Docker container\nimages to launch containerized SDK processes on the workers. By default, a\npipeline uses a prebuilt\n[Apache Beam image](https://hub.docker.com/search?q=apache%2Fbeam&type=image).\nHowever, you can provide a custom container image for your Dataflow job.\nWhen you specify a custom container image, Dataflow launches workers\nthat pull the specified image.\n\nYou might use a custom container for the following reasons:\n\n- Preinstall pipeline dependencies to reduce worker start time.\n- Preinstall pipeline dependencies that are not available in public repositories.\n- Preinstall pipeline dependencies when access to public repositories is turned off. Access might be turned off for security reasons.\n- Prestage large files to reduce worker start time.\n- Launch third-party software in the background.\n- Customize the execution environment.\n\nFor more information about custom containers in Apache Beam, see the\n[Apache Beam custom container guide](https://beam.apache.org/documentation/runtime/environments/).\nFor examples of Python pipelines that use custom containers, see\n[Dataflow custom containers](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/dataflow/custom-containers).\n\nNext steps\n\n- [Build custom container images](/dataflow/docs/guides/build-container-image)\n- [Build multi-architecture container images](/dataflow/docs/guides/multi-architecture-container)\n- [Run a Dataflow job in a custom container](/dataflow/docs/guides/run-custom-container)\n- [Troubleshoot custom containers](/dataflow/docs/guides/troubleshoot-custom-container)"]]