Devcontainer

VS Code devcontainer walkthrough: tools, mounts, and environment variables.

The devcontainer is defined in .devcontainer/devcontainer.json. It provides a fully configured Go development environment with all homelab tooling pre-installed.

Base Image

Built from .devcontainer/Dockerfile with --network=host run args (required for Pulumi to reach the Proxmox API and the Talos cluster directly).

VS Code Extensions

The following extensions are auto-installed:

ExtensionPurpose
golang.goGo language support (gopls, test runner, debugger)
ms-azuretools.vscode-dockerDocker and compose file support
ms-kubernetes-tools.vscode-kubernetes-toolskubectl, YAML validation, cluster explorer
redhat.vscode-yamlYAML schema validation
nefrob.vscode-just-syntaxjustfile syntax highlighting

Editor Settings

{
  "go.useLanguageServer": true,
  "go.toolsManagement.autoUpdate": false,
  "editor.formatOnSave": true,
  "go.lintTool": "golangci-lint",
  "go.formatTool": "gofumpt"
}

File Mounts

The devcontainer mounts several host paths into the container:

Host PathContainer PathNotes
~/.ssh/id_ed25519/home/vscode/.ssh/id_ed25519SSH key for Hetzner VPS access (read-only)
~/.ssh/id_ed25519.pub/home/vscode/.ssh/id_ed25519.pub(read-only)
~/.kube/home/vscode/.kubekubeconfig for kubectl access
vscode-go-modules (Docker volume)/home/vscode/go/pkg/modGo module cache (persists across rebuilds)

Environment Variables

VariableValuePurpose
GOPATH/home/vscode/goGo workspace
PULUMI_SKIP_UPDATE_CHECKtrueSuppress Pulumi update nags
TALOSCONFIG/workspace/infra/pulumi/talosconfigPoints talosctl to the cluster config
KUBECONFIG/workspace/infra/pulumi/kubeconfigPoints kubectl to the cluster
LOCAL_WORKSPACE_FOLDER${localWorkspaceFolder}Host workspace path (for scripts)
HOST_HOME${env:HOME}Host home directory (for SOPS age key path)

Post-Create Command

After container creation, the following runs to verify tooling:

sudo usermod -aG docker vscode && cdk8s --version && pulumi version && talosctl version --client

Host Requirements

  • CPUs: 2+
  • Memory: 4 GB+

Workspace

The repo is mounted at /workspace inside the container. All just recipes and Pulumi commands assume this path.