Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1002 Bytes

README.md

File metadata and controls

40 lines (29 loc) · 1002 Bytes

Cloud Run Server in Bash

Run on Google Cloud

This is a sample repository that runs a "server" in bash that can be deployed on Google Cloud Run.

See also https://github.com/matti/google-cloud-run-shell for real shell access

Setup

  1. Enable Cloud Build and Cloud Run:

    gcloud services enable --project "${PROJECT_ID}" \
      cloudbuild.googleapis.com \
      run.googleapis.com
  2. Build the container:

    gcloud builds submit \
      --project "${PROJECT_ID}" \
      --tag "gcr.io/${PROJECT_ID}/hello-world-bash" \
      .
  3. Deploy the container:

    gcloud beta run deploy "hello-world-bash" \
      --project "${PROJECT_ID}" \
      --platform "managed" \
      --region "us-central1" \
      --image "gcr.io/${PROJECT_ID}/hello-world-bash" \
      --allow-unauthenticated
  4. That's it!