[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MMTH95WKBZ0C5923YSA3T6":3,"skill-same:01M6MMTH95WKBZ0C5923YSA3T6":96},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6MMTH95WKBZ0C5923YSA3T6","cloud-run-basics",null,"Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).","arkhe-genesis\u002FArkhe-OS","arkhe-genesis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272629719?v=4","01M6KJDTSTJD2AD5RFPVZNGYCP","Rafael Oliveira","01M6KJDTXSTA997KDK184EA55A",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"cloud run basics","cloud run","run","cloud","basics","background","scheduled","requests","you","event","processing","worker","jobs","use","applications","services","pull","tasks","http","deploy","2026-11-10 10:12:30",false,"---\nname: cloud-run-basics\ndescription: >-\n  Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications\n  responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs),\n  or handle always-on pull-based background processing (worker pools).\n---\n\n# Cloud Run Basics\n\nCloud Run is a fully managed application platform for running your code,\nfunction, or container on top of Google's highly scalable infrastructure. It\nabstracts away infrastructure management, providing three primary resource\ntypes:\n\n1.  **Services:** Responds to HTTP requests sent to a unique and stable\n    endpoint, using stateless instances that autoscale based on a variety of key\n    metrics, also responds to events and functions.\n2.  **Jobs:** Executes parallelizable tasks that are executed manually, or on a\n    schedule, and run to completion.\n3.  **Worker pools:** Handles always-on background workloads such as pull-based\n    workloads, for example, Kafka consumers, Pub\u002FSub pull queues, or RabbitMQ\n    consumers.\n\n## Prerequisites\n\n1.  Enable the Cloud Run Admin API and Cloud Build APIs:\n\n    ```bash\n    gcloud services enable run.googleapis.com cloudbuild.googleapis.com --quiet\n    ```\n\n1.  If you are under a domain restriction organization policy [restricting](https:\u002F\u002Fdocs.cloud.google.com\u002Forganization-policy\u002Frestrict-domains)\n   unauthenticated invocations for your project, you will need to access your\n    deployed service as described under [Testing private\n    services](https:\u002F\u002Fdocs.cloud.google.com\u002Frun\u002Fdocs\u002Ftriggering\u002Fhttps-request#testing-private).\n\n### Required roles\n\nYou need the following roles to deploy your Cloud Run resource:\n\n*   Cloud Run Admin (`roles\u002Frun.admin`) on the project\n*   Cloud Run Source Developer (`roles\u002Frun.sourceDeveloper`) on the project\n*   Service Account User (`roles\u002Fiam.serviceAccountUser`) on the service\n    identity\n*   Logs Viewer (`roles\u002Flogging.viewer`) on the project\n\nCloud Build automatically uses the Compute Engine default service account as the\ndefault Cloud Build service account to build your source code and Cloud Run\nresource, unless you override this behavior.\n\nFor Cloud Build to build your sources, grant the Cloud Build service account the\nCloud Run Builder (`roles\u002Frun.builder`) role on your project:\n\n```bash\ngcloud projects add-iam-policy-binding PROJECT_ID \\\n    --member=serviceAccount:SERVICE_ACCOUNT_EMAIL_ADDRESS \\\n    --role=roles\u002Frun.builder \\\n    --quiet\n```\n\nReplace `PROJECT_ID` with your Google Cloud project ID and\n`SERVICE_ACCOUNT_EMAIL_ADDRESS` with the email address of the Cloud Build\nservice account.\n\n## Deploy a Cloud Run service\n\nYou can deploy your service to Cloud Run by using a container image or deploy\ndirectly from source code using a single Google Cloud CLI command.\n\n> **CRITICAL RULE:** Any deployed code MUST listen on 0.0.0.0 (not 127.0.0.1)\n> and use the injected $PORT environment variable (defaults to 8080), or it will\n> crash on boot.\n\n### Deploy a container image to Cloud Run\n\nCloud Run imports your container image during deployment. Cloud Run keeps this\ncopy of the container image as long as it is used by a serving revision.\nContainer images are not pulled from their container repository when a new Cloud\nRun instance is started.\n\n### Supported container images\n\nYou can directly use container images stored in the [Artifact\nRegistry](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Foverview), or\n[Docker Hub](https:\u002F\u002Fhub.docker.com\u002F). Google recommends the use of Artifact\nRegistry since Docker Hub images are\n[cached](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Fpull-cached-dockerhub-images)\nfor up to one hour.\n\nYou can use container images from other public or private registries (like JFrog\nArtifactory, Nexus, or GitHub Container Registry), by setting up an [Artifact\nRegistry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nYou should only consider [Docker Hub](https:\u002F\u002Fhub.docker.com\u002F) for deploying\npopular container images such as [Docker Official\nImages](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fofficial_images\u002F) or [Docker\nSponsored OSS images](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fdsos-program\u002F). For\nhigher availability, Google recommends deploying these Docker Hub images using\nan [Artifact Registry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nTo deploy a container image, run the following command:\n\n```bash\n    gcloud run deploy SERVICE_NAME \\\n        --image IMAGE_URL \\\n        --region us-central1 \\\n        --allow-unauthenticated \\\n        --quiet\n```\n\nReplace the following:\n\n*   SERVICE_NAME: the name of the service you want to deploy to. Service names\n    must be 49 characters or less and must be unique per region and project. If\n    the service does not exist yet, this command creates the service during the\n    deployment. You can omit this parameter entirely, but you will be prompted\n    for the service name if you omit it.\n*   IMAGE_URL: a reference to the container image, for example,\n    `us-docker.pkg.dev\u002Fcloudrun\u002Fcontainer\u002Fhello:latest`. If you use Artifact\n    Registry, the repository REPO_NAME must already be created. The URL follows\n    the format of `LOCATION-docker.pkg.dev\u002FPROJECT_ID\u002FREPO_NAME\u002FPATH:TAG`. Note\n    that if you don't supply the `--image` flag, the deploy command will attempt\n    to deploy from source code.\n\n### Deploy from source code\n\nThere are two different ways to deploy your service from source:\n\n*   Deploy from source with build (default): This option uses Google Cloud's\n    buildpacks and Cloud Build to automatically build container images from your\n    source code without having to install Docker on your machine or set up\n    buildpacks or Cloud Build. By default, Cloud Run uses the default machine\n    type provided by Cloud Build.\n\n    *   To deploy from source with automatic base image updates enabled, run the\n        following command:\n\n         ```bash\n         gcloud run deploy SERVICE_NAME --source . \\\n         --base-image BASE_IMAGE \\\n         --automatic-updates \\\n         --quiet\n         ```\n\n        Cloud Run only supports automatic base images that use [Google Cloud's\n        buildpacks base\n        images](https:\u002F\u002Fdocs.cloud.google.com\u002Fdocs\u002Fbuildpacks\u002Fbase-images).\n\n        *   To deploy from source using a Dockerfile, run the following command:\n\n         ```bash\n          gcloud run deploy SERVICE_NAME --source . --quiet\n         ```\n            When you provide a Dockerfile, Cloud Build runs it in the cloud, and\n            deploys the service.\n\n*   Deploy from source without build (Preview): This option deploys artifacts\n    directly to Cloud Run, bypassing the Cloud Build step. This allows for rapid\n    deployment times. To deploy from source without build, run the following\n    command:\n\n    ```bash\n    gcloud beta run deploy SERVICE_NAME \\\n     --source APPLICATION_PATH \\\n     --no-build \\\n     --base-image=BASE_IMAGE \\\n     --command=COMMAND \\\n     --args=ARG \\\n     --quiet\n    ```\n\n    Replace the following:\n\n    *   SERVICE_NAME: the name of your Cloud Run service.\n    *   APPLICATION_PATH: the location of your application on the local file\n        system.\n    *   BASE_IMAGE: the [runtime base image](https:\u002F\u002Fdocs.cloud.google.com\u002Frun\u002Fdocs\u002Fconfiguring\u002Fservices\u002Fruntime-base-images#how_to_obtain_base_images)\n    you want to use for your application. For example,\n        `us-central1-docker.pkg.dev\u002Fserverless-runtimes\u002Fgoogle-24-full\u002Fruntimes\u002Fnodejs24`.\n        You can also deploy a pre-compiled binary without configuring additional\n        language-specific runtime components using the OS only base image, such\n    as `osonly24`.\n    *   COMMAND: the command that the container starts up with.\n    *   ARG: an argument you send to the container command. If you use multiple\n    arguments, specify each on its own line.\n\n    For examples on deploying from source without build, see [Examples of\n        deploying from source without\n        build](https:\u002F\u002Fdocs.cloud.google.com\u002Frun\u002Fdocs\u002Fdeploying-source-code#examples-without-build).\n\n## Create and execute a Cloud Run job\n\nTo create a new job, run the following command:\n\n```bash\ngcloud run jobs create JOB_NAME --image IMAGE_URL OPTIONS --quiet\n```\n\nAlternatively, use the deploy command:\n\n```bash\ngcloud run jobs deploy JOB_NAME --image IMAGE_URL OPTIONS --quiet\n```\n\nReplace the following:\n\n*   JOB_NAME: the name of the job you want to create. If you omit this\n    parameter, you will be prompted for the job name when you run the command.\n*   IMAGE_URL: a reference to the container image—for example,\n    `us-docker.pkg.dev\u002Fcloudrun\u002Fcontainer\u002Fjob:latest`.\n\n*   Optionally, replace OPTIONS with any of the following flags:\n\n    *   `--tasks`: Accepts integers greater or equal to 1. Defaults to 1;\n        maximum is 10,000. Each task is provided the environment variables\n        `CLOUD_RUN_TASK_INDEX` with a value between 0 and the number of tasks\n        minus 1, along with `CLOUD_RUN_TASK_COUNT`, which is the number of\n        tasks.\n    *   `--max-retries`: The number of times a failed task is retried. Once any\n        task fails beyond this limit, the entire job is marked as failed. For\n        example, if set to 1, a failed task will be retried once, for a total of\n        two attempts. The default is 3. Accepts integers from 0 to 10.\n    *   `--task-timeout`: Accepts a duration like \"2s\". Defaults to 10 minutes;\n        maximum is 168 hours (7 days). For tasks using GPUs, the maximum\n        available timeout is 1 hour.\n    *   `--parallelism`: The maximum number of tasks that can execute in\n        parallel. By default, tasks will be started as quickly as possible in\n        parallel.\n    *   --execute-now: If set, immediately after the job is created, a job\n        execution is started. Equivalent to calling `gcloud run jobs create`\n        followed by `gcloud run jobs execute`.\n\n    In addition to these preceding options, you also specify more configuration\n    such as environment variables or memory limits.\n\nFor a full list of available options when creating a job, refer to the [`gcloud\nrun jobs\ncreate`](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fgcloud\u002Freference\u002Frun\u002Fjobs\u002Fcreate)\ncommand line documentation.\n\nWait for the job creation to finish. You'll see a success message upon a\nsuccessful completion.\n\nTo execute an existing job, run the following command:\n\n```bash\ngcloud run jobs execute JOB_NAME --quiet\n```\n\nIf you want the command to wait until the execution completes, run the following\ncommand:\n\n```bash\ngcloud run jobs execute JOB_NAME --wait --region=REGION --quiet\n```\n\nReplace the following:\n\n*   JOB_NAME: the name of the job.\n*   REGION: the region in which the resource can be found. For example,\n    `europe-west1`. Alternatively, set the `run\u002Fregion` property.\n\n## Deploy a worker pool\n\nYou can deploy a Cloud Run worker pool using container images or deploy directly\nfrom the source.\n\n### Deploy a container image\n\nYou can specify a container image with a tag (for example,\n`us-docker.pkg.dev\u002Fmy-project\u002Fcontainer\u002Fmy-image:latest`) or with an exact\ndigest (for example,\n`us-docker.pkg.dev\u002Fmy-project\u002Fcontainer\u002Fmy-image@sha256:41f34ab970ee...`).\n\n### Supported container images\n\nYou can directly use container images stored in the [Artifact\nRegistry](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Foverview), or\n[Docker Hub](https:\u002F\u002Fhub.docker.com\u002F). Google recommends the use of Artifact\nRegistry since Docker Hub images are\n[cached](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Fpull-cached-dockerhub-images)\nfor up to one hour.\n\nYou can use container images from other public or private registries (like JFrog\nArtifactory, Nexus, or GitHub Container Registry), by setting up an [Artifact\nRegistry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nYou should only consider [Docker Hub](https:\u002F\u002Fhub.docker.com\u002F) for deploying\npopular container images such as [Docker Official\nImages](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fofficial_images\u002F) or [Docker\nSponsored OSS images](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fdsos-program\u002F). For\nhigher availability, Google recommends deploying these Docker Hub images using\nan [Artifact Registry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nTo deploy a container image, run the following command:\n\n```bash\ngcloud run worker-pools deploy WORKER_POOL_NAME --image IMAGE_URL --quiet\n```\n\nReplace the following:\n\n*   WORKER_POOL_NAME: the name of the worker pool you want to deploy to. If the\n  worker pool does not exist yet, this command creates the worker pool during\n    the deployment. You can omit this parameter entirely, but you will be\n    prompted for the worker pool name if you omit it.\n\n*   IMAGE_URL: a reference to the container image that contains the worker pool,\n    such as `us-docker.pkg.dev\u002Fcloudrun\u002Fcontainer\u002Fworker-pool:latest`. Note that\n    if you don't supply the `--image` flag, the deploy command attempts to\n    deploy from source code.\n\nWait for the deployment to finish. Upon successful completion, Cloud Run\ndisplays a success message along with the revision information about the\ndeployed worker pool.\n\n### Deploy a worker pool from source\n\nYou can deploy a new worker pool or worker pool revision to Cloud Run directly\nfrom source code using a single gcloud CLI command, `gcloud run worker-pools`\ndeploy with the `--source` flag.\n\nThe deploy command defaults to source deployment if you don't supply the\n`--image` or `--source` flags.\n\nBehind the scenes, this command uses [Google Cloud's\nbuildpacks](https:\u002F\u002Fdocs.cloud.google.com\u002Fdocs\u002Fbuildpacks\u002Foverview) and Cloud\nBuild to automatically build container images from your source code without\nhaving to install Docker on your machine or set up buildpacks or Cloud Build. By\ndefault, Cloud Run uses the default machine type provided by Cloud Build.\n\nTo deploy a worker pool from source, run the following command:\n\n```bash\ngcloud run worker-pools deploy WORKER_POOL_NAME --source . --quiet\n```\n\nReplace `WORKER_POOL_NAME` with the name you want for your worker pool.\n\n### What to do if a deployment fails:\n\n1.  **IAM\u002FPermission Error:** Read\n    [iam-security.md](references\u002Fiam-security.md).\n2.  **Crash on Boot \u002F Healthcheck failed:** Fetch the logs immediately using\n    `gcloud logging read \"resource.labels.service_name=SERVICE_NAME\" --limit=20`\n    to find the exact runtime error.\n3.  **Native Dependency Error (Node\u002FPython):** If using `--no-build`, switch to\n    `--source .` (Buildpacks) to compile native extensions properly for Linux.\n\n## Reference Directory\n\n-   [Core Concepts](references\u002Fcore-concepts.md): Services vs. Jobs vs.\n    Worker pools, resource model, and auto-scaling behavior for services.\n\n-   [CLI Usage](references\u002Fcli-usage.md): Essential `gcloud run` commands for\n    deployment and management.\n\n-   [Client Libraries](references\u002Fclient-library-usage.md): Using Google\n    Cloud client libraries to interact with Cloud Run.\n\n-   [MCP Usage](references\u002Fmcp-usage.md): Using the Cloud Run remote MCP\n    server.\n\n-   [Infrastructure as Code](references\u002Fiac-usage.md): Terraform examples for\n    services, jobs, worker pools, and IAM bindings.\n\n-   [IAM & Security](references\u002Fiam-security.md): Roles, service identities,\n    and ingress\u002Fegress controls.\n\n*If you need product information not found in these references, use the\n    Developer Knowledge MCP server `search_documents` tool.*","# Cloud Run Basics\n\nCloud Run is a fully managed application platform for running your code,\nfunction, or container on top of Google's highly scalable infrastructure. It\nabstracts away infrastructure management, providing three primary resource\ntypes:\n\n1.  **Services:** Responds to HTTP requests sent to a unique and stable\n    endpoint, using stateless instances that autoscale based on a variety of key\n    metrics, also responds to events and functions.\n2.  **Jobs:** Executes parallelizable tasks that are executed manually, or on a\n    schedule, and run to completion.\n3.  **Worker pools:** Handles always-on background workloads such as pull-based\n    workloads, for example, Kafka consumers, Pub\u002FSub pull queues, or RabbitMQ\n    consumers.\n\n## Prerequisites\n\n1.  Enable the Cloud Run Admin API and Cloud Build APIs:\n\n    ```bash\n    gcloud services enable run.googleapis.com cloudbuild.googleapis.com --quiet\n    ```\n\n1.  If you are under a domain restriction organization policy [restricting](https:\u002F\u002Fdocs.cloud.google.com\u002Forganization-policy\u002Frestrict-domains)\n   unauthenticated invocations for your project, you will need to access your\n    deployed service as described under [Testing private\n    services](https:\u002F\u002Fdocs.cloud.google.com\u002Frun\u002Fdocs\u002Ftriggering\u002Fhttps-request#testing-private).\n\n### Required roles\n\nYou need the following roles to deploy your Cloud Run resource:\n\n*   Cloud Run Admin (`roles\u002Frun.admin`) on the project\n*   Cloud Run Source Developer (`roles\u002Frun.sourceDeveloper`) on the project\n*   Service Account User (`roles\u002Fiam.serviceAccountUser`) on the service\n    identity\n*   Logs Viewer (`roles\u002Flogging.viewer`) on the project\n\nCloud Build automatically uses the Compute Engine default service account as the\ndefault Cloud Build service account to build your source code and Cloud Run\nresource, unless you override this behavior.\n\nFor Cloud Build to build your sources, grant the Cloud Build service account the\nCloud Run Builder (`roles\u002Frun.builder`) role on your project:\n\n```bash\ngcloud projects add-iam-policy-binding PROJECT_ID \\\n    --member=serviceAccount:SERVICE_ACCOUNT_EMAIL_ADDRESS \\\n    --role=roles\u002Frun.builder \\\n    --quiet\n```\n\nReplace `PROJECT_ID` with your Google Cloud project ID and\n`SERVICE_ACCOUNT_EMAIL_ADDRESS` with the email address of the Cloud Build\nservice account.\n\n## Deploy a Cloud Run service\n\nYou can deploy your service to Cloud Run by using a container image or deploy\ndirectly from source code using a single Google Cloud CLI command.\n\n> **CRITICAL RULE:** Any deployed code MUST listen on 0.0.0.0 (not 127.0.0.1)\n> and use the injected $PORT environment variable (defaults to 8080), or it will\n> crash on boot.\n\n### Deploy a container image to Cloud Run\n\nCloud Run imports your container image during deployment. Cloud Run keeps this\ncopy of the container image as long as it is used by a serving revision.\nContainer images are not pulled from their container repository when a new Cloud\nRun instance is started.\n\n### Supported container images\n\nYou can directly use container images stored in the [Artifact\nRegistry](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Foverview), or\n[Docker Hub](https:\u002F\u002Fhub.docker.com\u002F). Google recommends the use of Artifact\nRegistry since Docker Hub images are\n[cached](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Fpull-cached-dockerhub-images)\nfor up to one hour.\n\nYou can use container images from other public or private registries (like JFrog\nArtifactory, Nexus, or GitHub Container Registry), by setting up an [Artifact\nRegistry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nYou should only consider [Docker Hub](https:\u002F\u002Fhub.docker.com\u002F) for deploying\npopular container images such as [Docker Official\nImages](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fofficial_images\u002F) or [Docker\nSponsored OSS images](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fdsos-program\u002F). For\nhigher availability, Google recommends deploying these Docker Hub images using\nan [Artifact Registry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nTo deploy a container image, run the following command:\n\n```bash\n    gcloud run deploy SERVICE_NAME \\\n        --image IMAGE_URL \\\n        --region us-central1 \\\n        --allow-unauthenticated \\\n        --quiet\n```\n\nReplace the following:\n\n*   SERVICE_NAME: the name of the service you want to deploy to. Service names\n    must be 49 characters or less and must be unique per region and project. If\n    the service does not exist yet, this command creates the service during the\n    deployment. You can omit this parameter entirely, but you will be prompted\n    for the service name if you omit it.\n*   IMAGE_URL: a reference to the container image, for example,\n    `us-docker.pkg.dev\u002Fcloudrun\u002Fcontainer\u002Fhello:latest`. If you use Artifact\n    Registry, the repository REPO_NAME must already be created. The URL follows\n    the format of `LOCATION-docker.pkg.dev\u002FPROJECT_ID\u002FREPO_NAME\u002FPATH:TAG`. Note\n    that if you don't supply the `--image` flag, the deploy command will attempt\n    to deploy from source code.\n\n### Deploy from source code\n\nThere are two different ways to deploy your service from source:\n\n*   Deploy from source with build (default): This option uses Google Cloud's\n    buildpacks and Cloud Build to automatically build container images from your\n    source code without having to install Docker on your machine or set up\n    buildpacks or Cloud Build. By default, Cloud Run uses the default machine\n    type provided by Cloud Build.\n\n    *   To deploy from source with automatic base image updates enabled, run the\n        following command:\n\n         ```bash\n         gcloud run deploy SERVICE_NAME --source . \\\n         --base-image BASE_IMAGE \\\n         --automatic-updates \\\n         --quiet\n         ```\n\n        Cloud Run only supports automatic base images that use [Google Cloud's\n        buildpacks base\n        images](https:\u002F\u002Fdocs.cloud.google.com\u002Fdocs\u002Fbuildpacks\u002Fbase-images).\n\n        *   To deploy from source using a Dockerfile, run the following command:\n\n         ```bash\n          gcloud run deploy SERVICE_NAME --source . --quiet\n         ```\n            When you provide a Dockerfile, Cloud Build runs it in the cloud, and\n            deploys the service.\n\n*   Deploy from source without build (Preview): This option deploys artifacts\n    directly to Cloud Run, bypassing the Cloud Build step. This allows for rapid\n    deployment times. To deploy from source without build, run the following\n    command:\n\n    ```bash\n    gcloud beta run deploy SERVICE_NAME \\\n     --source APPLICATION_PATH \\\n     --no-build \\\n     --base-image=BASE_IMAGE \\\n     --command=COMMAND \\\n     --args=ARG \\\n     --quiet\n    ```\n\n    Replace the following:\n\n    *   SERVICE_NAME: the name of your Cloud Run service.\n    *   APPLICATION_PATH: the location of your application on the local file\n        system.\n    *   BASE_IMAGE: the [runtime base image](https:\u002F\u002Fdocs.cloud.google.com\u002Frun\u002Fdocs\u002Fconfiguring\u002Fservices\u002Fruntime-base-images#how_to_obtain_base_images)\n    you want to use for your application. For example,\n        `us-central1-docker.pkg.dev\u002Fserverless-runtimes\u002Fgoogle-24-full\u002Fruntimes\u002Fnodejs24`.\n        You can also deploy a pre-compiled binary without configuring additional\n        language-specific runtime components using the OS only base image, such\n    as `osonly24`.\n    *   COMMAND: the command that the container starts up with.\n    *   ARG: an argument you send to the container command. If you use multiple\n    arguments, specify each on its own line.\n\n    For examples on deploying from source without build, see [Examples of\n        deploying from source without\n        build](https:\u002F\u002Fdocs.cloud.google.com\u002Frun\u002Fdocs\u002Fdeploying-source-code#examples-without-build).\n\n## Create and execute a Cloud Run job\n\nTo create a new job, run the following command:\n\n```bash\ngcloud run jobs create JOB_NAME --image IMAGE_URL OPTIONS --quiet\n```\n\nAlternatively, use the deploy command:\n\n```bash\ngcloud run jobs deploy JOB_NAME --image IMAGE_URL OPTIONS --quiet\n```\n\nReplace the following:\n\n*   JOB_NAME: the name of the job you want to create. If you omit this\n    parameter, you will be prompted for the job name when you run the command.\n*   IMAGE_URL: a reference to the container image—for example,\n    `us-docker.pkg.dev\u002Fcloudrun\u002Fcontainer\u002Fjob:latest`.\n\n*   Optionally, replace OPTIONS with any of the following flags:\n\n    *   `--tasks`: Accepts integers greater or equal to 1. Defaults to 1;\n        maximum is 10,000. Each task is provided the environment variables\n        `CLOUD_RUN_TASK_INDEX` with a value between 0 and the number of tasks\n        minus 1, along with `CLOUD_RUN_TASK_COUNT`, which is the number of\n        tasks.\n    *   `--max-retries`: The number of times a failed task is retried. Once any\n        task fails beyond this limit, the entire job is marked as failed. For\n        example, if set to 1, a failed task will be retried once, for a total of\n        two attempts. The default is 3. Accepts integers from 0 to 10.\n    *   `--task-timeout`: Accepts a duration like \"2s\". Defaults to 10 minutes;\n        maximum is 168 hours (7 days). For tasks using GPUs, the maximum\n        available timeout is 1 hour.\n    *   `--parallelism`: The maximum number of tasks that can execute in\n        parallel. By default, tasks will be started as quickly as possible in\n        parallel.\n    *   --execute-now: If set, immediately after the job is created, a job\n        execution is started. Equivalent to calling `gcloud run jobs create`\n        followed by `gcloud run jobs execute`.\n\n    In addition to these preceding options, you also specify more configuration\n    such as environment variables or memory limits.\n\nFor a full list of available options when creating a job, refer to the [`gcloud\nrun jobs\ncreate`](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fgcloud\u002Freference\u002Frun\u002Fjobs\u002Fcreate)\ncommand line documentation.\n\nWait for the job creation to finish. You'll see a success message upon a\nsuccessful completion.\n\nTo execute an existing job, run the following command:\n\n```bash\ngcloud run jobs execute JOB_NAME --quiet\n```\n\nIf you want the command to wait until the execution completes, run the following\ncommand:\n\n```bash\ngcloud run jobs execute JOB_NAME --wait --region=REGION --quiet\n```\n\nReplace the following:\n\n*   JOB_NAME: the name of the job.\n*   REGION: the region in which the resource can be found. For example,\n    `europe-west1`. Alternatively, set the `run\u002Fregion` property.\n\n## Deploy a worker pool\n\nYou can deploy a Cloud Run worker pool using container images or deploy directly\nfrom the source.\n\n### Deploy a container image\n\nYou can specify a container image with a tag (for example,\n`us-docker.pkg.dev\u002Fmy-project\u002Fcontainer\u002Fmy-image:latest`) or with an exact\ndigest (for example,\n`us-docker.pkg.dev\u002Fmy-project\u002Fcontainer\u002Fmy-image@sha256:41f34ab970ee...`).\n\n### Supported container images\n\nYou can directly use container images stored in the [Artifact\nRegistry](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Foverview), or\n[Docker Hub](https:\u002F\u002Fhub.docker.com\u002F). Google recommends the use of Artifact\nRegistry since Docker Hub images are\n[cached](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Fpull-cached-dockerhub-images)\nfor up to one hour.\n\nYou can use container images from other public or private registries (like JFrog\nArtifactory, Nexus, or GitHub Container Registry), by setting up an [Artifact\nRegistry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nYou should only consider [Docker Hub](https:\u002F\u002Fhub.docker.com\u002F) for deploying\npopular container images such as [Docker Official\nImages](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fofficial_images\u002F) or [Docker\nSponsored OSS images](https:\u002F\u002Fdocs.docker.com\u002Fdocker-hub\u002Fdsos-program\u002F). For\nhigher availability, Google recommends deploying these Docker Hub images using\nan [Artifact Registry remote\nrepository](https:\u002F\u002Fdocs.cloud.google.com\u002Fartifact-registry\u002Fdocs\u002Frepositories\u002Fremote-repo).\n\nTo deploy a container image, run the following command:\n\n```bash\ngcloud run worker-pools deploy WORKER_POOL_NAME --image IMAGE_URL --quiet\n```\n\nReplace the following:\n\n*   WORKER_POOL_NAME: the name of the worker pool you want to deploy to. If the\n  worker pool does not exist yet, this command creates the worker pool during\n    the deployment. You can omit this parameter entirely, but you will be\n    prompted for the worker pool name if you omit it.\n\n*   IMAGE_URL: a reference to the container image that contains the worker pool,\n    such as `us-docker.pkg.dev\u002Fcloudrun\u002Fcontainer\u002Fworker-pool:latest`. Note that\n    if you don't supply the `--image` flag, the deploy command attempts to\n    deploy from source code.\n\nWait for the deployment to finish. Upon successful completion, Cloud Run\ndisplays a success message along with the revision information about the\ndeployed worker pool.\n\n### Deploy a worker pool from source\n\nYou can deploy a new worker pool or worker pool revision to Cloud Run directly\nfrom source code using a single gcloud CLI command, `gcloud run worker-pools`\ndeploy with the `--source` flag.\n\nThe deploy command defaults to source deployment if you don't supply the\n`--image` or `--source` flags.\n\nBehind the scenes, this command uses [Google Cloud's\nbuildpacks](https:\u002F\u002Fdocs.cloud.google.com\u002Fdocs\u002Fbuildpacks\u002Foverview) and Cloud\nBuild to automatically build container images from your source code without\nhaving to install Docker on your machine or set up buildpacks or Cloud Build. By\ndefault, Cloud Run uses the default machine type provided by Cloud Build.\n\nTo deploy a worker pool from source, run the following command:\n\n```bash\ngcloud run worker-pools deploy WORKER_POOL_NAME --source . --quiet\n```\n\nReplace `WORKER_POOL_NAME` with the name you want for your worker pool.\n\n### What to do if a deployment fails:\n\n1.  **IAM\u002FPermission Error:** Read\n    [iam-security.md](references\u002Fiam-security.md).\n2.  **Crash on Boot \u002F Healthcheck failed:** Fetch the logs immediately using\n    `gcloud logging read \"resource.labels.service_name=SERVICE_NAME\" --limit=20`\n    to find the exact runtime error.\n3.  **Native Dependency Error (Node\u002FPython):** If using `--no-build`, switch to\n    `--source .` (Buildpacks) to compile native extensions properly for Linux.\n\n## Reference Directory\n\n-   [Core Concepts](references\u002Fcore-concepts.md): Services vs. Jobs vs.\n    Worker pools, resource model, and auto-scaling behavior for services.\n\n-   [CLI Usage](references\u002Fcli-usage.md): Essential `gcloud run` commands for\n    deployment and management.\n\n-   [Client Libraries](references\u002Fclient-library-usage.md): Using Google\n    Cloud client libraries to interact with Cloud Run.\n\n-   [MCP Usage](references\u002Fmcp-usage.md): Using the Cloud Run remote MCP\n    server.\n\n-   [Infrastructure as Code](references\u002Fiac-usage.md): Terraform examples for\n    services, jobs, worker pools, and IAM bindings.\n\n-   [IAM & Security](references\u002Fiam-security.md): Roles, service identities,\n    and ingress\u002Fegress controls.\n\n*If you need product information not found in these references, use the\n    Developer Knowledge MCP server `search_documents` tool.*",{"name":5,"description":7},"main","74cd3c4137064fdcde71ed9fe5c4bff58921d899",".agents\u002Fskills\u002Fcloud-run-basics",0,"https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS","https:\u002F\u002Fgithub.com\u002Farkhe-genesis","2026-11-08 09:08:55",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add arkhe-genesis\u002FArkhe-OS --skill cloud-run-basics",{"tool":62,"command":63},"bunx","bunx skills add arkhe-genesis\u002FArkhe-OS --skill cloud-run-basics",{"tool":65,"command":66},"pnpm","pnpm dlx skills add arkhe-genesis\u002FArkhe-OS --skill cloud-run-basics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002FSKILL.md",true,[70,76,80,84,88,92],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fcli-usage.md","REFERENCE","参考文档",2481,"https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002Freferences\u002Fcli-usage.md",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fclient-library-usage.md",3398,"https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002Freferences\u002Fclient-library-usage.md",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fcore-concepts.md",6678,"https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002Freferences\u002Fcore-concepts.md",{"path":85,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fiac-usage.md",2013,"https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002Freferences\u002Fiac-usage.md",{"path":89,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fiam-security.md",3991,"https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002Freferences\u002Fiam-security.md",{"path":93,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fmcp-usage.md",1900,"https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fcloud-run-basics\u002Freferences\u002Fmcp-usage.md",[97,119,136,156,180,199],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":44},"01M6MN97RPP1Q9BG489WHW70R8","career-ops","AI job search command center -- evaluate offers, generate CVs, scan portals, track applications","https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002Ftools\u002F.ai-integrations\u002Fvscode\u002F.claude\u002Fskills\u002Fcareer-ops\u002FSKILL.md",[],[104,105,106,107,38,108,109,110,111,112,113,114,115,116,117,118],"ops","career","career ops","track","evaluate","mode","true","command center","cvs","scan","command","offers","Job Search","search","generate",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":44},"01M6MN93GFX8W9J1PCKDKZVD3N","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002Ftools\u002F.agents\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[126,127,37,128,129,130,131,132,110,133,32,134,135],"zoom out","zoom","how","context","code","it","perspective","re","with","understand",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":145,"publishedAt":44},"01M6MN8Y2ETBC91BGREF4D39JH","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.","https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002Ftools\u002F.agents\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[142],{"categoryNo":143,"categoryName":144,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[146,147,148,134,149,150,151,152,153,37,154,155],"write","write a skill","progressive disclosure","resources","new agent","structure","new skill","build","user","create",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":163,"publishedAt":44},"01M6MN8RWE2V2PPFVPD0G8FHKF","triage","Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.","https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002Ftools\u002F.agents\u002Fskills\u002Ftriage\u002FSKILL.md",[162],{"categoryNo":143,"categoryName":144,"taxonomyType":21,"taxonomyTypeDesc":22},[158,164,165,155,31,166,167,168,169,170,171,37,172,173,174,175,176,177,178,179],"bugs","state machine","machine","feature","roles","issue workflow","manage","issue","issues","state","for","feature requests","prepare","triage issues","workflow","review",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":191,"publishedAt":44},"01M6MN8KVDBD28672WMER7HPXM","to-prd","Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.","https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002Ftools\u002F.agents\u002Fskills\u002Fto-prd\u002FSKILL.md",[186],{"categoryNo":187,"categoryName":188,"taxonomyType":189,"taxonomyTypeDesc":190},"01JBSEEDCAT000000000000031","产品经理","PROFESSION","适用职业",[192,193,37,154,129,194,155,171,195,131,196,197,198],"to prd","prd","publish","issue tracker","project","conversation","tracker",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":205,"publishedAt":44},"01M6MN8E9CGYVWVDDR0NJEFDBB","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.","https:\u002F\u002Fgithub.com\u002Farkhe-genesis\u002FArkhe-OS\u002Fblob\u002Fmain\u002Ftools\u002F.agents\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[172,206,207,196,208,209,195,210,211,198,171,212,37,154,213,214,215,193,155],"to issues","spec","down","break","break down","tickets","implementation","work","convert","plan"]