Cloud Run 是全代管應用程式平台,可讓您執行可透過要求或事件叫用的容器。Cloud Run 採用無伺服器技術,可為您省去所有管理基礎架構的麻煩,讓您專心處理最重要的工作,也就是建構出色的應用程式。瞭解詳情。
使用價值 $300 美元的免費抵免額,開始進行概念驗證
-
取得 Gemini 2.0 Flash Thinking 的存取權
-
每月免費使用 AI API 和 BigQuery 等熱門產品
-
不會自動收費,也不會要求您一定要購買特定方案
繼續探索超過 20 項一律免費的產品
使用超過 20 項實用的免費產品,包括 AI API、VM 和 data warehouse 等。
訓練
訓練與教學課程
搭配使用 Pub/Sub 與 Cloud Run
瞭解如何編寫及部署 Cloud Run 服務,以及如何透過 Pub/Sub 推送訂閱項目呼叫這類服務。
訓練
訓練與教學課程
教學課程:處理 Cloud Storage 中的圖片
使用 Cloud Run、Cloud Vision API 和 ImageMagick,偵測上傳至 Cloud Storage 值區的不雅圖片,並將其模糊處理。
訓練
訓練與教學課程
保護 Cloud Run 服務教學課程
建立在 Cloud Run 上執行的安全雙服務應用程式。這個應用程式是 Markdown 編輯器,包含公用的「前端」服務 (任何人都能用來撰寫 Markdown 文字),以及私人的「後端」服務 (可將 Markdown 文字轉譯為 HTML)。
訓練
訓練與教學課程
在本地排解 Cloud Run 服務問題
使用 Google Cloud Observability 工具進行探索,並透過本機開發工作流程進行調查,排解 Cloud Run 服務中斷的問題。本教學課程會使用範例專案,該專案在部署時會導致執行階段錯誤,您將排解這些錯誤,找出並修正問題。
訓練
訓練與教學課程
在 Cloud Run GPU 上使用 Gemma 3 和 Ollama 執行 LLM 推論
瞭解如何在啟用 GPU 的 Cloud Run 服務上部署 Google 的 Gemma 3。
訓練
訓練與教學課程
Hello Cloud Run
本實驗室的目標是協助您建構容器映像檔,並部署至 Cloud Run。在本實驗室中,您會以無狀態容器部署及執行無狀態容器,學習如何開始使用 Cloud Run。
star
star
star
star
star_half
45 分鐘
入門
5 學分
訓練
訓練與教學課程
使用 Cloud Run 和 Pub/Sub 建構可復原的非同步系統
在 Google Cloud Run 無伺服器任務的實驗室中,您要支援一間虛擬的企業,並輔助其中角色導入無伺服器解決方案。
star
star
star
star
star_half
1 小時
入門
7 個學分
用途
用途
網路服務:REST API 後端
新型行動應用程式通常會使用符合 REST 樣式的後端 API 來呈現應用程式目前的資料,並區分前端與後端開發團隊的工作內容。透過在 Cloud Run 中運作的 API 服務,開發人員可以在 Cloud SQL 或 Firestore (NoSQL) 等代管資料庫中穩固地保存資料。登入 Cloud Run 的使用者可以存取 Cloud 資料庫中儲存的應用程式資源資料。
網路服務
API
Cloud SQL
Firestore
後端
用途
用途
網路服務:後勤部門管理工作
一般來說,後勤部門的管理工作必須使用文件、試算表和其他自訂整合項目,同時也必須執行供應商提供的網頁應用程式。在 Cloud Run 上託管容器化的內部網頁應用程式之後,應用程式便隨時處於就緒狀態,而且您僅須支付應用程式運作期間的費用。
網路服務
後勤部門
管理工作
用途
用途
建構 Cloud Run 資料處理應用程式,在收到輕量資料時進行轉換,然後儲存為結構化資料。轉換作業可由 Google Cloud 來源觸發。每次有 .csv 檔案建立完成時,系統都會啟動事件並傳送至 Cloud Run 服務。系統接著會擷取資料、將資料轉為結構化形式,然後儲存到 BigQuery 資料表中。
網路服務
資料處理
結構化資料
轉換
用途
用途
自動化:排定文件產生作業
您可以使用 Cloud Scheduler 排定每月定期執行的工作,透過 Cloud Run 服務產生應付憑據。您可以將含有自訂二進位檔的容器部署至 Cloud Run,如此一來,您就能在不使用伺服器的情況下,透過 LibreOffice 等 PDF 產生工具執行這項作業,而您也僅須支付應付憑據產生作業的費用。
自動化
工作排程
用途
用途
自動化:使用 Webhook 建立業務工作流程
您可以採用事件導向的做法,將不同作業相互連結。Cloud Run 在實作 Webhook 目標、以要求形式推送事件的過程中,都可以視需求調度資源,而且只會在您接收及處理事件時產生費用。運用可以及時反應的服務來觸發基礎架構中的微服務,藉此針對 GitHub 或 Slack 事件做出回應,或是在購買交易完成、工作就緒或快訊觸發時傳送 Webhook。
自動化
業務工作流程
Webhook
事件
用途
用途
將 Node.js 應用程式從 Heroku 遷移至 Cloud Run
瞭解如何將在 Heroku 上執行的 Node.js 網頁應用程式遷移至 Google Cloud 的 Cloud Run。本教學課程適用於架構師和產品負責人,協助他們將應用程式從 Heroku 遷移至 Google Cloud 的代管服務。
Node.js
遷移
用途
用途
Google Cloud 中 .NET 應用程式的翻新途徑
本文將探討單體式應用程式的常見限制,並說明翻新這類應用程式的結構化逐步流程。本文適用於熟悉 Windows 和 .NET 生態系統的雲端架構師、系統管理員和技術長,可協助您進一步瞭解現代化程序。
.NET
現代化
遷移
程式碼範例
程式碼範例
從範本啟動 Cloud Run 專案
在 IntelliJ 中從範本啟動應用程式,包括 Flask、Django、Node.js、Java 和 Go 範本。
程式碼範例
程式碼範例
Node.js 範例
包括 HelloWorld、Pub/Sub、Cloud SQL 範例、圖片處理等。
程式碼範例
程式碼範例
Python 範例
包括 HelloWorld、Pub/Sub 和 Cloud SQL 範例
程式碼範例
程式碼範例
Go 範例
包括 HelloWorld、Pub/Sub、Cloud SQL 範例、圖片處理等。
程式碼範例
程式碼範例
Java 範例
包括 HelloWorld、Pub/Sub、Cloud SQL 範例、圖片處理等。
程式碼範例
程式碼範例
.Net HelloWorld
Cloud Run 的 .Net 範例
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-09-04 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Cloud Run documentation\n=======================\n\n[Read product documentation](/run/docs/overview/what-is-cloud-run)\nCloud Run is a fully managed application platform that lets you run\ncontainers that are invocable via requests or events.\nCloud Run is serverless: it abstracts away all\ninfrastructure management, so you can focus on what matters most---building\ngreat applications. [Learn more](/run/docs/overview/what-is-cloud-run).\n[Get started for free](https://console.cloud.google.com/freetrial) \n\n#### Start your proof of concept with $300 in free credit\n\n- Get access to Gemini 2.0 Flash Thinking\n- Free monthly usage of popular products, including AI APIs and BigQuery\n- No automatic charges, no commitment \n[View free product offers](/free/docs/free-cloud-features#free-tier) \n\n#### Keep exploring with 20+ always-free products\n\n\nAccess 20+ free products for common use cases, including AI APIs, VMs, data warehouses,\nand more.\n\nDocumentation resources\n-----------------------\n\nFind quickstarts and guides, review key references, and get help with common issues. \nformat_list_numbered\n\n### Guides\n\n-\n\n\n Quickstarts:\n [Service](/run/docs/quickstarts/deploy-container),\n\n [Job](/run/docs/quickstarts/jobs/create-execute),\n or\n [Function](/run/docs/quickstarts/functions/deploy-functions-console)\n\n\n-\n\n [Learn about the Cloud Run container runtime contract](/run/docs/container-contract)\n\n-\n\n [Deploy container images](/run/docs/deploying)\n\n-\n\n [Continuous deployment from Git](/run/docs/continuous-deployment-with-cloud-build)\n\n-\n\n [Deploy a function](/run/docs/deploy-functions)\n\n-\n\n [Map custom domains](/run/docs/mapping-custom-domains)\n\n-\n\n [Add authentication to Cloud Run apps](/run/docs/securing/identity-aware-proxy-cloud-run)\n\nfind_in_page\n\n### Reference\n\n-\n\n [gcloud commands](/sdk/gcloud/reference/run)\n\n-\n\n [Container runtime contract](/run/docs/reference/container-contract)\n\n-\n\n [IAM Roles](/run/docs/reference/iam/roles)\n\n-\n\n [Configuration options for Cloud Run services](/run/docs/configuring)\n\ninfo\n\n### Resources\n\n-\n\n [Pricing](/run/pricing)\n\n-\n\n [Release notes](/run/docs/release-notes)\n\n-\n\n [Locations](/run/docs/locations)\n\n-\n\n [Support](/run/docs/support)\n\nRelated resources\n-----------------\n\nTraining and tutorials \nUse cases \nCode samples \nExplore self-paced training, use cases, reference architectures, and code samples with examples of how to use and connect Google Cloud services. Training \nTraining and tutorials\n\n### Pub/Sub with Cloud Run\n\n\nLearn how to write, deploy, and call a Cloud Run service from a Pub/Sub push subscription.\n\n\n[Learn more](/run/docs/tutorials/pubsub) \nTraining \nTraining and tutorials\n\n### Processing images from Cloud Storage tutorial\n\n\nUse Cloud Run, Cloud Vision API, and ImageMagick to detect and blur offensive images uploaded to a Cloud Storage bucket.\n\n\n[Learn more](/run/docs/tutorials/image-processing) \nTraining \nTraining and tutorials\n\n### Securing Cloud Run services tutorial\n\n\nCreate a secure two-service application running on Cloud Run. This application is a Markdown editor which includes a public \"frontend\" service which anyone can use to compose markdown text, and a private \"backend\" service which renders Markdown text to HTML.\n\n\n[Learn more](/run/docs/tutorials/secure-services) \nTraining \nTraining and tutorials\n\n### Local troubleshooting of a Cloud Run service\n\n\nTroubleshoot a broken Cloud Run service using Google Cloud Observability tools for discovery and a local development workflow for investigation. This tutorial uses a sample project that results in runtime errors when deployed, which you troubleshoot to find and fix the problem.\n\n\n[Learn more](/run/docs/tutorials/local-troubleshooting) \nTraining \nTraining and tutorials\n\n### Run LLM inference on Cloud Run GPUs with Gemma 3 and Ollama\n\n\nLearn how to deploy Google's Gemma 3 on a GPU-enabled Cloud Run service.\n\n\n[Learn more](/run/docs/tutorials/gpu-gemma-with-ollama) \nTraining \nTraining and tutorials\n\n### Hello Cloud Run\n\n\nThe goal of this lab is for you to build a container image and deploying it to Cloud Run. In this lab, you'll learn how to get started with Cloud Run by deploying and running a stateless container.\n\n\nstar star star star star_half\n45 minutes introductory 5 credits\n\n\u003cbr /\u003e\n\n[Learn more\narrow_forward](https://www.cloudskillsboost.google/focuses/5162?parent=catalog) \nTraining \nTraining and tutorials\n\n### Build a Resilient, Asynchronous System with Cloud Run and Pub/Sub\n\n\nFor the labs in the Google Cloud Run Serverless Quest, you will read through a fictitious business scenario in each lab and assist the characters in implementing a serverless solution.\n\n\nstar star star star star_half\n1 hour introductory 7 credits\n\n\u003cbr /\u003e\n\n[Learn more\narrow_forward](https://www.cloudskillsboost.google/focuses/8389?parent=catalog) \nUse case \nUse cases\n\n### Web services: REST APIs backend\n\n\nModern mobile apps commonly rely on RESTful backend APIs to provide current views of application data and separation for frontend and backend development teams. API services running on Cloud Run allow developers to persist data reliably on managed databases such as Cloud SQL or Firestore (NoSQL). Logging in to Cloud Run grants users access to app‐resource data stored in Cloud Databases.\n\nWeb services API Cloud SQL Firestore backend\n\n\u003cbr /\u003e\n\n[Learn more](/run/docs/triggering/https-request) \nUse case \nUse cases\n\n### Web services: Back‐office administration\n\n\nBack‐office administration often requires documents, spreadsheets, and other custom integrations, and running a vendor‐supplied web application. Hosting the containerized internal web application on Cloud Run means it is always ready and you are only billed when it is used.\n\nWeb services back office administration\n\n\u003cbr /\u003e\n\n[Learn more](/run/docs/tutorials/identity-platform) \nUse case \nUse cases\n\n### Data processing: Lightweight data transformation\n\n\nBuild Cloud Run data processing applications that transform lightweight data as it arrives and store it as structured data. Transformations can be triggered from Google Cloud sources. When a .csv file is created, an event is fired and delivered to a Cloud Run service. Data is then extracted, structured, and stored in a BigQuery table.\n\nWeb services data processing structured data transformations\n\n\u003cbr /\u003e\n\n[Learn more](/run/docs/tutorials/image-processing) \nUse case \nUse cases\n\n### Automation: Scheduled document generation\n\n\nSchedule a monthly job with Cloud Scheduler to generate invoices using a Cloud Run service. Because containers containing custom binaries can be deployed to Cloud Run, it is able to run in a PDF generation tool like LibreOffice in a serverless way, which means only paying when you are generating invoices.\n\nAutomation job scheduling\n\n\u003cbr /\u003e\n\n[Learn more](/run/docs/triggering/using-scheduler) \nUse case \nUse cases\n\n### Automation: Business workflow with webhooks\n\n\nConnect your operations together with an event‐driven approach. Cloud Run scales on demand while implementing a webhook target, pushing events in the form of requests and only charging you when you receive and process the event. React to events from GitHub or Slack, or send webhooks when a purchase is made, a job is ready, or an alert is fired with a service that can react on a just‐in‐time basis to trigger a microservice in your infrastructure.\n\nAutomation business workflow webhooks events\n\n\u003cbr /\u003e\n\n[Learn more](/run/docs/triggering/webhooks) \nUse case \nUse cases\n\n### Migrating Node.js apps from Heroku to Cloud Run\n\n\nLearn how to migrate Node.js web apps that are running on Heroku to Cloud Run on Google Cloud. This tutorial is intended for architects and product owners who want to migrate their apps from Heroku to managed services on Google Cloud.\n\nNode.js Migration\n\n\u003cbr /\u003e\n\n[Learn more](/run/docs/migrate/migrating-nodejs-apps-from-heroku-to-cloud-run) \nUse case \nUse cases\n\n### Modernization path for .NET applications on Google Cloud\n\n\nThis document looks at the common limitations of monolithic applications and describes a gradual yet structured process for modernizing them. This document is intended for cloud architects, system administrators, and CTOs who are familiar with Windows and the .NET ecosystem and want to learn more about what modernization involves.\n\n.NET Modernization Migration\n\n\u003cbr /\u003e\n\n[Learn more](/solutions/modernization-path-dotnet-applications-google-cloud) \nCode sample \nCode Samples\n\n### Starting a Cloud Run project from a template\n\n\nStart your app from a template within Intellij, including Flask, Django, Node.js, Java, and Go templates.\n\n\n[Get started](/code/docs/intellij/creating-a-cloud-run-app) \nCode sample \nCode Samples\n\n### Node.js samples\n\n\nIncludes HelloWorld, Pub/Sub, Cloud SQL examples, image processing, and many others.\n\n\n[Open GitHub](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/run/helloworld/) \nCode sample \nCode Samples\n\n### Python samples\n\n\nIncludes HelloWorld, Pub/Sub, and Cloud SQL examples\n\n\n[Open GitHub](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/run/) \nCode sample \nCode Samples\n\n### Go samples\n\n\nIncludes HelloWorld, Pub/Sub, Cloud SQL examples, image processing, and many others.\n\n\n[Open GitHub](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/run/) \nCode sample \nCode Samples\n\n### Java samples\n\n\nIncludes HelloWorld, Pub/Sub, Cloud SQL examples, image processing, and many others.\n\n\n[Open GitHub](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/run/) \nCode sample \nCode Samples\n\n### .Net HelloWorld\n\n\n.Net sample for Cloud Run\n\n\n[Open GitHub](https://github.com/GoogleCloudPlatform/dotnet-docs-samples/tree/main/run/helloworld)\n\nRelated videos\n--------------"]]