diff --git a/.devcontainer/devops-dev/devcontainer.json b/.devcontainer/devops-dev/devcontainer.json index b2177ef..cd197f0 100644 --- a/.devcontainer/devops-dev/devcontainer.json +++ b/.devcontainer/devops-dev/devcontainer.json @@ -20,6 +20,11 @@ "runArgs": [ "--hostname=devops" ], + "mounts": [ + "source=${localEnv:HOME}/.kube,target=/home/vscode/.kube,type=bind", + "source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind", + "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind" + ], "customizations": { "vscode": { "extensions": [ diff --git a/README.md b/README.md index 7d689fb..4581998 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,26 @@ mkdir -p .devcontainer curl -sSL https://gitlimbosolutions.com/mf/devcontainers/devops/templates/devcontainer.json -o .devcontainer/devcontainer.json ``` -This will copy the baseline devcontainer.json into your project. You can then layer project‑specific extensions or settings on top. +This will copy the baseline devcontainer.json into your project. +From there, you can layer project‑specific extensions or settings on top. +🔧 Local Overrides with devcontainer.local.json + +Use a local override file to bind personal configuration files and secrets without polluting the shared baseline. For example, to mount your kube config, git settings, and SSH keys: + +```json +"mounts": [ + "source=${localEnv:HOME}/.kube,target=/home/vscode/.kube,type=bind", // enables kube-related plugins and CLI + "source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind", // enables git-related plugins and CLI + "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind" // enables SSH-based plugins and CLI +] +``` + +✅ Keeps sensitive paths out of version control + +✅ Ensures plugins and CLI tools can access your local configs + +✅ Fully replaces the mounts array from the baseline when defined locally ## 🧾 Included Components