Skip to content

Instantly share code, notes, and snippets.

@alecthegeek
Created June 1, 2021 22:25
Show Gist options
  • Save alecthegeek/bbf25a9c5917ed00cbd631ce618171e0 to your computer and use it in GitHub Desktop.
Save alecthegeek/bbf25a9c5917ed00cbd631ce618171e0 to your computer and use it in GitHub Desktop.
Bash alias to run Google gcloud via Docker
# Bash alias to run Google gcloud via Docker
alias gcloud="docker run --workdir=/home/cloudsdk/work --user cloudsdk:cloudsdk \
--mount type=bind,source=$PWD,target=/home/cloudsdk/work \
--mount type=volume,source=gcloud_config,target=/home/cloudsdk/.config \
--rm -ti gcr.io/google.com/cloudsdktool/cloud-sdk:slim gcloud"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment