Skip to content

Instantly share code, notes, and snippets.

@jamesward
Last active April 14, 2021 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesward/cfaa2c6ea5900e1e0ffaf96cc89a8275 to your computer and use it in GitHub Desktop.
Save jamesward/cfaa2c6ea5900e1e0ffaf96cc89a8275 to your computer and use it in GitHub Desktop.
Run Cloud Shell via Docker
export GOOGLE_APPLICATION_CREDENTIALS=your.json
docker run -it \
-eTRUSTED_ENVIRONMENT=true \
-eCLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=/certs/svc_account.json \
-v$GOOGLE_APPLICATION_CREDENTIALS:/certs/svc_account.json \
-v/var/run/docker.sock:/var/run/docker.sock \
--entrypoint=/bin/bash \
gcr.io/cloudshell-images/cloudshell \
--login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment