Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat menyesuaikan lingkungan runtime kode pengguna di pipeline Dataflow dengan menyediakan image penampung kustom. Penampung kustom
didukung untuk pipeline yang menggunakan Dataflow
Runner v2.
Saat memulai VM pekerja, Dataflow menggunakan image penampung Docker untuk meluncurkan proses SDK dalam penampung di pekerja. Secara default, pipeline menggunakan image Apache Beam bawaan.
Namun, Anda dapat menyediakan image container kustom untuk tugas Dataflow.
Saat Anda menentukan image container kustom, Dataflow akan meluncurkan pekerja yang mengambil image yang ditentukan.
Anda dapat menggunakan penampung kustom karena alasan berikut:
Pra-instal dependensi pipeline untuk mengurangi waktu mulai pekerja.
Pra-instal dependensi pipeline yang tidak tersedia di
repositori publik.
Pra-instal dependensi pipeline saat akses ke repositori publik dinonaktifkan. Akses mungkin dinonaktifkan karena alasan keamanan.
Lakukan pra-penyetelan file besar untuk mengurangi waktu mulai pekerja.
Meluncurkan software pihak ketiga di latar belakang.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)"]]