Pull and use the Google Cloud CLI Docker image
masterThe Google Cloud CLI Docker image allows you to execute gcloud and bq commands in an isolated container without local installation. The images are hosted on Artifact Registry under the repository gcr.io/google.com/cloudsdktool/google-cloud-cli (or regional mirrors like us.gcr.io, eu.gcr.io, and asia.gcr.io).
To pull a specific version of the stable release, use docker pull. To verify the installation, run gcloud version within the container using docker run.
# Pull a specific version
docker pull gcr.io/google.com/cloudsdktool/google-cloud-cli:573.0.0-stable
# Verify the installation
docker run --rm gcr.io/google.com/cloudsdktool/google-cloud-cli:573.0.0-stable gcloud version
# Or verify using the floating stable tag
docker run --rm gcr.io/google.com/cloudsdktool/google-cloud-cli:stable gcloud version