Google Cloud Shell is great, we use it a lot during training. And recently it has gotten a whole lot better, since you can bring your own docker image as a basis for your environment.
As part of our daily operations, Stark & Wayne publishes several docker images that include all the valuable tools we use when performing Cloud Foundry related tasks. Since Google Power Shell has very specific requirements for an environment image (e.g. it must be hosted on Google Container Registry), we have setup a public registry so you don’t have to.
Configuring Google Cloud Shell
To open the Cloud Shell, open your Google Console and click on the Cloud Shell icon in the application bar:
Configure using cloudshell cli
Run the following command in your Cloud Shell session:
cloudshell env update-default-image --image gcr.io/starkandwayne-registry/gcp-cloudshell:latest
Now skip to Restart Cloud Shell.
Configure using the user interface
Restarting the Cloud Shell will open a bottom drawer with your Shell Environment. Now lets open up the Cloud Shell Environment settings page by click on the laptop button:
From the setting page click Edit:
Now for Image select ‘Select image from project’, enter gcr.io/starkandwayne-registry/gcp-cloudshell:latest
for the image location and click Save:
Restart Cloud Shell
To use our custom image, the Cloud Shell needs to be restarted. Which can be done by click restart from the “More” menu:
After restarting your Cloud Shell, the image url should appear in the first line of your session:
Missing Something
If we have missed a tool which you expected to be there, please create an issue, or send us a Pull Request to add it to the Cloud Shell Dockerfile.