The Google Cloud Developer's toolbox.
Lots of trades have toolboxes. If you're a cloud engineer, here's the one you need. Batteries included.

I love the idea behind dev containers. The concept that you can have a repository with everything you need to build software which is specific to that repo and with a configuration that lives alongside the code is… well… it’s excellent.
However platform/cloud engineers, (not to be confused with DevOps, as that’s not a job title but rather a culture) don’t often have the luxury of operating in a consistent code repository where cloud infrastructure and tools exist in one place.
Say you’re a platform engineer, and you’re building some automation scripts with bash or python. You’ll (probably) need to install python, the gcloud cli, maybe terraform. And then if you ever need to hand over your code to someone else, then they’ll need to install those tools. And what about if that developer installs a different version of python than the one you had, or if they run their terraform and it outputs different results because of a version clash? Now, compound this problem by the number of engineers working in the org and it starts to get messy.
I thought I’d take the liberty of building a devcontainer.json
for this problem not only for myself, since I occasionally work on remote machines, so it saves me installing stuff every time, but also for teams who might find it useful and who would want to take it and run with it. And also for those who may be just starting out with Google Cloud who may not know how to get all these tools setup or would otherwise spend hours doing so.
Let’s get into it!
The dev container
Without further ado, here it is (this is best viewed on a large screen):
{
"name": "Google Cloud Developer's Toolbox",
"image": "gcr.io/google.com/cloudsdktool/google-cloud-cli:latest",
"features": {
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/devcontainers/features/terraform:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"googlecloudtools.cloudcode",
"hashicorp.terraform",
"ms-azuretools.vscode-docker",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"ms-python.python",
"redhat.vscode-yaml"
],
"settings": {
"editor.formatOnSave": true,
"editor.trimAutoWhitespace": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"go.useLanguageServer": true,
"telemetry.telemetryLevel": "off"
}
}
},
"postCreateCommand": "npm install -g firebase-tools"
}
The full and up-to-date file and repo is here: https://github.com/jgunnink/google-cloud-developers-toolbox
Discussion
Most of the file should be relatively self explanatory, but just in case it isn’t, let’s discuss!
The devcontainer starts off with a base image to use to then build from and add additional components. In this example, we’re using the google-cloud-cli
as our base image, followed by several “features”. These features are the tools we’re adding to the toolbox, so going down the list, you can see we start with go as this is a common language for developing CLIs and other tools. Then we add kubectl-helm-minikube which is a bunch of tools for interacting with kubernetes clusters. Then we add node followed by python as these are both common programming languages used very often by a number of applications and scripts. Finally we add terraform for developing infrastructure as code.
With the tools added, it’s time to add some “quality of life” to the experience of working with those tools. So we add some VS Code customisations to the file. We add a number of extensions to help with linting, syntax highlighting and working with the cloud. We also add some useful settings, at least, settings I think are useful which should be common across all users. Things like auto-formatting code, removing whitespace and so on help reduce the amount of lines in a diff if someone has them turned off and someone doesn’t.
Finally at the end, we run a command at the end of the creation of the dev container which installs the firebase CLI via the command:
npm install -g firebase-tools
Thanks for reading this post, I hope it’s helpful for you in some way. Let me know in the comments section if this is useful to you. I’d love to hear about your use-cases!