Add devcontainer configuration with Dockerfile and devcontainer.json

This commit is contained in:
Cédric Verstraeten
2026-03-07 19:59:04 +01:00
parent 791f8014ec
commit f0504ab96d
2 changed files with 49 additions and 0 deletions

27
.devcontainer/Dockerfile Normal file
View File

@@ -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

View File

@@ -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"
}