Update devcontainer for Go and cloud tooling

Switch base image to the Go 1.25 Bookworm devcontainer and rework container tooling installs. Remove explicit apt/pip installs from the old image and instead remove the expired Yarn repo key, install Azure CLI, Helm, kubectl, Argo CD CLI, and Google Cloud SDK (including GKE auth plugin). Update devcontainer metadata: change container name, add --privileged to runArgs, and refresh the VS Code extensions list to include Go/Helm/AKS/Azure tooling and Copilot.
This commit is contained in:
Cédric Verstraeten
2026-03-07 20:04:16 +01:00
parent f0504ab96d
commit 2ce9c5bc0c
2 changed files with 44 additions and 42 deletions

View File

@@ -1,27 +1,28 @@
FROM mcr.microsoft.com/devcontainers/base:bookworm
FROM mcr.microsoft.com/devcontainers/go:1.25-bookworm
# Install common CLI tooling for Helm chart development and validation.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
jq \
python3 \
python3-pip \
shellcheck \
yq \
&& rm -rf /var/lib/apt/lists/*
# Remove expired Yarn GPG key from base image
RUN sudo rm -f /etc/apt/sources.list.d/yarn.list
# Install the latest Helm 3 release.
RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Remove expired Yarn repository key (inherited from base image)
RUN sudo rm -f /etc/apt/sources.list.d/yarn.list
# Install the latest stable kubectl release.
RUN KUBECTL_VERSION="$(curl -fsSL https://dl.k8s.io/release/stable.txt)" \
&& curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl
# Install AZURE CLI
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
# Install YAML linter via pip (available as yamllint command).
RUN pip3 install --no-cache-dir yamllint
# Install helm and kubectl
RUN curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod +x ./kubectl \
&& sudo mv ./kubectl /usr/local/bin/kubectl
USER vscode
# Install Argocd CLI
RUN VERSION=$(curl -L -s https://raw.githubusercontent.com/argoproj/argo-cd/stable/VERSION)
RUN curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/download/v$VERSION/argocd-linux-amd64
RUN sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
RUN rm argocd-linux-amd64
# Install google-cloud-sdk
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
RUN sudo apt-get update && sudo apt-get install -y google-cloud-cli
RUN sudo apt-get install google-cloud-cli-gke-gcloud-auth-plugin

View File

@@ -1,22 +1,23 @@
{
"name": "helm-charts-bookworm",
"runArgs": [
"--name=kerberos-helm-charts",
"--network=host"
],
"dockerFile": "Dockerfile",
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot",
"ms-azuretools.vscode-docker",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"redhat.vscode-yaml"
]
}
},
"postCreateCommand": "helm version && kubectl version --client && yamllint --version"
"name": "go:1.25-bookworm",
"dockerFile": "Dockerfile",
"runArgs": [
"--name=helm-charts",
"--network=host",
"--privileged"
],
"customizations": {
"vscode": {
"extensions": [
"ms-kubernetes-tools.vscode-kubernetes-tools",
"redhat.vscode-yaml",
"Tim-Koehler.helm-intellisense",
"ms-vscode.azurecli",
"ms-vscode-remote.remote-containers",
"GitHub.copilot",
"ms-kubernetes-tools.vscode-aks-tools",
"fabiospampinato.vscode-diff"
]
}
}
}