커스텀 컨테이너 이미지를 제공하여 Dataflow 파이프라인에서 사용자 코드의 런타임 환경을 맞춤설정할 수 있습니다. 커스텀 컨테이너는 Dataflow Runner v2를 사용하는 파이프라인에서 지원됩니다.
Dataflow는 작업자 VM을 시작할 때 Docker 컨테이너 이미지를 사용하여 작업자에서 컨테이너화된 SDK 프로세스를 시작합니다. 기본적으로 파이프라인은 사전 빌드된 Apache Beam 이미지를 사용합니다.
하지만 Dataflow 작업에 대해 커스텀 컨테이너 이미지를 제공할 수 있습니다.
커스텀 컨테이너 이미지를 지정하면 Dataflow는 지정된 이미지를 가져오는 작업자를 시작합니다.
다음과 같은 이유로 커스텀 컨테이너를 사용할 수 있습니다.
파이프라인 종속 항목을 사전 설치하여 작업자 시작 시간을 단축합니다.
공개 저장소에서 사용할 수 없는 파이프라인 종속 항목을 사전 설치합니다.
공개 저장소에 대한 액세스가 해제되면 파이프라인 종속 항목을 사전 설치합니다. 보안상의 이유로 액세스가 사용 중지될 수 있습니다.
[[["이해하기 쉬움","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-09-04(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,["# Use custom containers in Dataflow\n\nYou 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\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)"]]