Files
devcontainers/README.md
T
marcio.fernandes 901d7cbfe1
/ build-push-image (push) Successful in 18s
Update README.md
2026-06-05 09:38:01 +00:00

117 lines
4.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# devcontainers
## DevOps
This devcontainer is built on **mcr.microsoft.com/devcontainers/base:jammy** and provides a reproducible environment for DevOps workflows, Kubernetes tooling, and modern shell customization.
I currently use it across all my infrastructure projects — from Kubernetes clusters to CI/CD pipelines — and even drop it into running pods when I need to trace or debug issues directly insitu. It has become my **Swissarmy knife for infrastructure**, giving me a consistent, portable toolkit wherever I work.
## 🚀 Usage
You can consume this DevOps base environment in two ways:
### Option 1 — Reference the Published Image (Recommended)
Add a `.devcontainer/devcontainer.json` to your project that points to the published image:
```json
{
"image": "oci.limbosolutions.com/public/devcontainers/devops:latest",
}
```
### Option 2 — Bootstrap with the Template JSON
you prefer to start from the canonical template (with preconfigured VS Code plugins), execute:
``` bash
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.
From there, you can layer projectspecific 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
### 🔧 Base Packages
- **curl, wget, git** → essential CLI tools
- **python3 + pip** → scripting and automation support
- **jq** → JSON parsing
- **ca-certificates, software-properties-common** → secure package management
- **ansible** → configuration management and automation
- **rclone, rsync** → file synchronization and transfer utilities
- **age**
- **sops**
### ☸️ Kubernetes Tooling
- **kubectl** → latest stable release installed from upstream
- **Helm 3** → Kubernetes package manager
- **yq** → YAML processor for configuration pipelines
- **fluxcd cli**
### 🟢 Node.js Runtime
- **Node.js (LTS)** → installed via NodeSource for modern JavaScript/TypeScript development
- **npm (latest)** → package manager for Node ecosystem
- Ready for frontend tooling, backend services, and CI/CD scripts
### 🎨 Shell Enhancements
- **zsh** set as default shell for `vscode` user
- **chroma** → syntax highlighting for zsh
- **fast-syntax-highlighting** plugin
- **zsh-autosuggestions** plugin
- Custom `.zshrc` from `assets/` for consistent shell experience
### ⚙️ Developer Utilities
- **act** → run GitHub Actions locally for testing workflows
### OCI containers utils
- **buildkit**
-
## Development Environment with Dev Container
This project includes a Dev Container configuration to provide a fully reproducible, isolated, and consistent development environment. It ensures that all contributors work with the same toolchain, without requiring any dependencies to be installed on the host system.
**What the Dev Container Provides:**
- A stable, versioncontrolled Node.js environment
- Full support for Vue 3 + Vite development
- Preinstalled development tools (npm, eslint, etc.)
- Automatic VS Code integration with recommended extensions
- A clean, isolated workspace that does not affect the host
- Deterministic builds and predictable behavior across machines
**How to Use It:**
1. Install the Dev Containers extension in VS Code
1. Open the project folder
1. VS Code will prompt you to:
- Reopen in Container
1. The container will build automatically and your development environment will be ready