Container Registry tidak digunakan lagi. Mulai 18 Maret 2025, Container Registry akan dinonaktifkan dan penulisan image ke Container Registry tidak tersedia. Untuk mengetahui informasi selengkapnya tentang penghentian penggunaan Container Registry dan cara melakukan migrasi ke Artifact Registry, lihat Penghentian penggunaan Container Registry.
Jika memiliki persyaratan kepatuhan atau peraturan, Anda dapat mengenkripsi image
container menggunakan kunci enkripsi yang dikelola pelanggan (CMEK). Kunci CMEK dikelola di Cloud Key Management Service. Saat menggunakan CMEK, Anda dapat menonaktifkan akses ke image container terenkripsi untuk sementara atau
secara permanen dengan menonaktifkan atau
menghancurkan kunci tersebut.
Batasan kebijakan organisasi
Batasan kebijakan organisasi dapat memengaruhi penggunaan
Container Registry jika berlaku untuk layanan yang digunakan
Container Registry.
Batasan untuk bucket penyimpanan
Jika Cloud Storage API berada dalam daftar kebijakan Deny untuk constraints/gcp.restrictNonCmekServices batasan, Anda tidak dapat mengirim image ke Container Registry. Container Registry tidak menggunakan CMEK untuk membuat
bucket penyimpanan saat image pertama dikirim ke host, dan Anda tidak dapat
membuat bucket penyimpanan secara manual.
Jika Anda perlu menerapkan batasan kebijakan organisasi ini, sebaiknya
hosting image di Artifact Registry. Anda dapat membuat repositori secara manual di Artifact Registry yang mendukung permintaan ke domain gcr.io sehingga Anda dapat terus menggunakan alur kerja image container yang ada. Untuk
mengetahui detailnya, lihat
Bertransisi ke repositori dengan dukungan domain gcr.io.
Saat constraints/gcp.restrictCmekCryptoKeyProjects dikonfigurasi, bucket penyimpanan harus dienkripsi dengan CryptoKey dari project, folder, atau organisasi yang diizinkan. Bucket baru akan menggunakan kunci yang dikonfigurasi, tetapi bucket yang sudah ada dan tidak mematuhi kebijakan harus dikonfigurasi untuk menggunakan kunci yang diperlukan secara default.
Untuk mengetahui informasi selengkapnya tentang cara batasan diterapkan ke bucket Cloud Storage,
lihat dokumentasi Cloud Storage tentang batasan.
Batasan untuk topik Pub/Sub
Saat Anda mengaktifkan Container Registry API dalam
projectGoogle Cloud , Container Registry akan mencoba membuat
topik Pub/Sub secara otomatis dengan ID topik gcr menggunakan kunci enkripsi
yang dikelola Google.
Jika Pub/Sub API ada dalam daftar kebijakan Deny untuk batasan constraints/gcp.restrictNonCmekServices, topik harus dienkripsi dengan CMEK. Permintaan untuk membuat topik tanpa enkripsi CMEK akan gagal.
[[["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-08-11 UTC."],[[["\u003cp\u003eContainer Registry uses Cloud Storage to store container images, and Cloud Storage encrypts data server-side by default.\u003c/p\u003e\n"],["\u003cp\u003eFor compliance, customer-managed encryption keys (CMEK) can be used to encrypt container images stored in Container Registry, allowing control over access by disabling or destroying the key.\u003c/p\u003e\n"],["\u003cp\u003eOrganization policy constraints, particularly those related to Cloud Storage and Pub/Sub APIs, can affect Container Registry usage, such as preventing image pushes or requiring CMEK for new storage buckets and Pub/Sub topics.\u003c/p\u003e\n"],["\u003cp\u003eIf \u003ccode\u003econstraints/gcp.restrictNonCmekServices\u003c/code\u003e is enforced, you cannot push images to Container Registry, and Artifact Registry is recommended as an alternative.\u003c/p\u003e\n"],["\u003cp\u003eContainer Registry can use CMEK by leveraging storage buckets configured with CMEK in Cloud Storage; however, this is impossible if \u003ccode\u003econstraints/gcp.restrictNonCmekServices\u003c/code\u003e is being used.\u003c/p\u003e\n"]]],[],null,["# Using customer-managed encryption keys\n\nContainer Registry stores container images in Cloud Storage. Cloud Storage\nalways [encrypts your data on the server side](/storage/docs/encryption/default-keys).\n\nIf you have compliance or regulatory requirements, you can encrypt your container\nimages using [customer-managed encryption keys (CMEK)](/kms/docs/cmek). CMEK keys\nare managed in Cloud Key Management Service. When you use CMEK, you can temporarily or\npermanently disable access to an encrypted container image by disabling or\ndestroying the key.\n\nOrganization policy constraints\n-------------------------------\n\n[Organization policy constraints](/resource-manager/docs/organization-policy/org-policy-constraints) can affect usage of\nContainer Registry when they apply to services that Container Registry\nuses.\n\n### Constraints for storage buckets\n\n- When the Cloud Storage API is in the `Deny` policy list for the\n constraint `constraints/gcp.restrictNonCmekServices`, you cannot push images\n to Container Registry. Container Registry does not use CMEK to create\n storage buckets when the first image is pushed to a host, and you cannot\n create the storage buckets manually.\n\n If you need to enforce this organization policy constraint, consider\n hosting your images in Artifact Registry instead. You can manually create\n repositories in Artifact Registry that support requests to the `gcr.io` domain\n so that you can continue to use your existing container image workflows. For\n details, see\n [Transition to repositories with gcr.io domain support](/artifact-registry/docs/transition/setup-gcr-repo#analysis).\n- When `constraints/gcp.restrictCmekCryptoKeyProjects` is configured,\n storage buckets must be encrypted with a CryptoKey from an allowed project,\n folder, or organization. New buckets will use the configured key, but existing\n buckets that are not compliant must be configured to use the required key by\n default.\n\nFor more information about how constraints apply to Cloud Storage buckets,\nsee the [Cloud Storage documentation](/storage/docs/org-policy-constraints) about constraints.\n\n### Constraints for Pub/Sub topics\n\nWhen you activate the Container Registry API in a\nGoogle Cloud project, Container Registry tries to automatically create a\nPub/Sub topic with the topic ID `gcr` using Google-managed\nencryption keys.\n\nWhen the Pub/Sub API is in the `Deny` policy list for the\nconstraint `constraints/gcp.restrictNonCmekServices`, topics must be encrypted\nwith CMEK. Requests to create a topic without CMEK encryption will fail.\n\nTo create the `gcr` topic with CMEK encryption, see the Pub/Sub\n[instructions for encrypting topics](/pubsub/docs/encryption#using-cmek).\n\nConfiguring buckets to use CMEK\n-------------------------------\n\nContainer Registry is not directly integrated with Cloud KMS.\nInstead, it is [CMEK-compliant](/kms/docs/cmek#cmek_compliance) when you store\nyour container images in storage buckets\n[configured to use CMEK](/storage/docs/encryption/customer-managed-keys).\n| **Note:** When the Cloud Storage API is in the `Deny` policy list for the organization policy constraint [constraints/gcp.restrictNonCmekServices](#org-policy-storage), you cannot create and configure CMEK on Container Registry buckets.\n\n1. If you have not done so,\n [push an image to Container Registry](/container-registry/docs/pushing-and-pulling).\n The storage bucket does not use a CMEK key yet.\n\n2. In Cloud Storage,\n [configure the storage bucket](/storage/docs/encryption/using-customer-managed-keys)\n to use the CMEK key.\n\nThe bucket name for a registry host\nhas one of the following formats:\n\n- `artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com` for images stored on the host `gcr.io`\n- \u003cvar translate=\"no\"\u003eSTORAGE-REGION\u003c/var\u003e`.artifacts.`\u003cvar translate=\"no\"\u003ePROJECT-ID\u003c/var\u003e`.appspot.com` for images stored on `asia.gcr.io`, `eu.gcr.io`, or `us.gcr.io`.\n\nWhat's next?\n------------\n\n- Learn more about [managing Container Registry images](/container-registry/docs/managing).\n- Learn more about [CMEK](/kms/docs/cmek)\n- Learn more about [Cloud Storage](/storage/docs)"]]