- Dockerfile with all required tools (kubectl, flux, helm, sops, age, etc.) - devcontainer.json with VSCode config and extensions - postCreateCommand.sh for setup verification - Comprehensive README with setup instructions for macOS, Windows/WSL2, Linux - Automatic mounts for kubeconfig, SSH keys, age encryption keys - SOPS_AGE_KEY_FILE and KUBECONFIG pre-configured Enables development on Windows, macOS, and Linux with consistent environment. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
57 lines
2.2 KiB
Docker
57 lines
2.2 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
# Install base tools
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
wget \
|
|
git \
|
|
ca-certificates \
|
|
gnupg \
|
|
lsb-release \
|
|
apt-transport-https \
|
|
vim \
|
|
nano \
|
|
jq \
|
|
yq \
|
|
zsh \
|
|
sudo \
|
|
openssh-client \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install kubectl
|
|
RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
|
|
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list && \
|
|
apt-get update && apt-get install -y kubectl && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Helm
|
|
RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
|
|
|
# Install Flux CLI
|
|
RUN curl -s https://fluxcd.io/install.sh | bash
|
|
|
|
# Install sops
|
|
RUN SOPS_VERSION=$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | grep tag_name | cut -d '"' -f 4) && \
|
|
curl -sL -o /usr/local/bin/sops https://github.com/getsops/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux.amd64 && \
|
|
chmod +x /usr/local/bin/sops
|
|
|
|
# Install age
|
|
RUN apt-get update && apt-get install -y age && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Docker CLI (for interacting with Docker daemon)
|
|
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
|
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
|
apt-get update && apt-get install -y docker-ce-cli && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create a non-root user 'vscode' for development
|
|
RUN useradd -m -s /bin/bash -G docker vscode && \
|
|
echo "vscode ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vscode
|
|
|
|
# Install oh-my-zsh for better shell experience
|
|
RUN su - vscode -c "sh -c '$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)' '' --unattended"
|
|
|
|
USER vscode
|
|
WORKDIR /workspace
|