From f0504ab96df10aef60a2cb4d9787316f075b4314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Verstraeten?= Date: Sat, 7 Mar 2026 19:59:04 +0100 Subject: [PATCH] Add devcontainer configuration with Dockerfile and devcontainer.json --- .devcontainer/Dockerfile | 27 +++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 22 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..0ad4c4f --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,27 @@ +FROM mcr.microsoft.com/devcontainers/base: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/* + +# Install the latest Helm 3 release. +RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + +# 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 YAML linter via pip (available as yamllint command). +RUN pip3 install --no-cache-dir yamllint + +USER vscode diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2a1e9bc --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +{ + "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" +}