Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Sie können ein in Artifact Registry gespeichertes Container-Image in Cloud Run bereitstellen. Sie können auch direkt aus der Quelle in Cloud Run bereitstellen. Dazu wird automatisch ein Container-Image für die erstellte Quelle erstellt und in Artifact Registry gespeichert.
Für das Deployment erforderliche Berechtigungen
Aus der Quelle bereitstellen
Für die Bereitstellung aus der Quelle benötigen Sie Berechtigungen zum Erstellen, Speichern des erstellten Container-Images und zum Bereitstellen.
Container-Images bereitstellen
Für die Bereitstellung in Cloud Run benötigen Sie die Rolle „Artifact Registry Reader“ (roles/artifactregistry.reader) für das Projekt oder Repository, das die Images enthält, die Sie bereitstellen möchten, sowie die Bereitstellungsberechtigungen für Cloud Run.
Wenn sich Ihre Repositories in einem anderen Projekt befinden, müssen Sie dem Cloud Run-Dienst-Agent Berechtigungen für die Artifact Registry-Leserrolle erteilen.
Übertragen Sie das Container-Image per Push in ein Artifact Registry-Repository.
Stellen Sie das Container-Image aus dem Repository in Cloud Run bereit.
Cloud Run sendet und empfängt Images über das Repository cloud-run-source-deploy in der Region, die Sie bei der Bereitstellung angeben.
Wenn das Repository nicht vorhanden ist, wird es von Cloud Run für Sie erstellt, sofern Ihr Konto die erforderlichen Berechtigungen hat.
Sie können ein Image anhand des Tags oder Digests bereitstellen, das in der Artifact Registry gespeichert ist.
Wenn Sie einen Dienst zum ersten Mal bereitstellen, wird die erste Überarbeitung erstellt. Überarbeitungen können nach der Erstellung nicht mehr geändert werden. Wenn Sie den Dienst aus einem Container-Image-Tag bereitstellen, wird er in einen Digest aufgelöst. Die Überarbeitung bedient anschließend immer diesen speziellen Digest.
Sie können einen Container mit der Google Cloud -Console oder der gcloud-Befehlszeile bereitstellen. Eine Anleitung finden Sie unter Container-Images bereitstellen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-18 (UTC)."],[[["\u003cp\u003eCloud Run supports deploying container images from Artifact Registry, or directly from source code, automatically creating and storing the image in Artifact Registry.\u003c/p\u003e\n"],["\u003cp\u003eDeploying from source requires permissions to build, store, and deploy the built container image.\u003c/p\u003e\n"],["\u003cp\u003eDeploying container images requires the Artifact Registry Reader role and Cloud Run deployment permissions, potentially including permissions for the Cloud Run Service Agent if images are in a different project.\u003c/p\u003e\n"],["\u003cp\u003eCloud Run can automatically containerize local source code, push the image to a specified Artifact Registry repository, and deploy it, creating the repository if necessary and permissions are in place.\u003c/p\u003e\n"],["\u003cp\u003eContainer images can be deployed by tag or digest, and deploying a service for the first time will create an immutable revision that is bound to a specific digest.\u003c/p\u003e\n"]]],[],null,["# Deploying to Cloud Run\n\nYou can deploy a container image stored in Artifact Registry to\n[Cloud Run](/run/docs). You can also deploy directly from source to\nCloud Run, which includes automatically creating a container image for\nyour built source and storing the image in Artifact Registry.\n\nPermissions required to deploy\n------------------------------\n\nDeploying from source\n: To deploy from source, you must have\n [permissions](/run/docs/deploying-source-code#required_roles)\n to build, store the built container image, and deploy.\n\nDeploying container images\n\n: To deploy to Cloud Run, you must have the Artifact\n Registry Reader role (`roles/artifactregistry.reader`) on the project or\n repository containing the images you want to deploy and the\n Cloud Run\n [deployment permissions](/run/docs/deploying#required_roles).\n\n If your repositories are in a different project, you must grant\n Artifact Registry Reader permissions to the\n [Cloud Run Service Agent](/iam/docs/service-agents).\n\nDeploying from local source\n---------------------------\n\nFor [supported languages](/run/docs/deploying-source-code#supported),\nCloud Run can automatically:\n\n1. Containerize local source code.\n2. Push the container image to an Artifact Registry repository.\n3. Deploy the container image Cloud Run from the repository.\n\nCloud Run pushes and pulls images using the repository\n`cloud-run-source-deploy` in the region that you specify at deploy time.\nIf the repository does not exist, Cloud Run creates it for you if\nyour account has the required [permissions](/run/docs/deploying-source-code#permissions_required_to_deploy).\n\nFor details, see [Deploying from source code](/run/docs/deploying-source-code#permissions_required_to_deploy). You can also try the\n[Cloud Run quickstarts](/run/docs/quickstarts) for languages that\nsupport deploying from source code.\n\nDeploying container images\n--------------------------\n\nYou can deploy an image by [tag or digest](/artifact-registry/docs/docker/names#versions) that is stored in\nArtifact Registry.\n\nDeploying to a service for the first time creates its first revision. Note that\nrevisions are immutable. If you deploy from a container image tag, it will be\nresolved to a digest and the revision will always serve this particular digest.\n\nYou can deploy a container using the Google Cloud console or the `gcloud`\ncommand line. For instructions see, [Deploying container images](/run/docs/deploying)."]]