This guide explains how to set up and use the DevOps-OS development container, a comprehensive multi-language development environment with integrated CI/CD capabilities.
DevOps-OS is a development container that provides a pre-configured environment for multi-language development and DevOps operations. It includes support for:
- Multiple programming languages (Python, Java, JavaScript/TypeScript, Go)
- CI/CD tools and pipelines
- Kubernetes and container orchestration
- Infrastructure as Code (IaC)
- Testing and code quality tools
Before getting started, ensure you have the following installed:
- Docker (Latest version)
- Visual Studio Code (Latest version)
- Dev Containers extension for VS Code
-
Clone your project repository:
git clone https://github.com/yourusername/your-project.git cd your-project -
Generate a dev container in the project root:
python -m cli.devopsos init --dir .On a fresh target, this creates
.devcontainer/Dockerfile,.devcontainer/devcontainer.json, and.devcontainer/devcontainer.env.jsonfrom the template-backed generator. -
Open the project in VS Code and click "Reopen in Container" when prompted, or run the "Dev Containers: Reopen in Container" command from the Command Palette.
-
Create a new directory for your project:
mkdir my-devops-project cd my-devops-project -
Generate the dev container configuration using the CLI:
python -m cli.devopsos init --dir .This creates
.devcontainer/Dockerfile,.devcontainer/devcontainer.json, and.devcontainer/devcontainer.env.json. If you want the legacy two-file output instead, usepython -m cli.scaffold_devcontainer --output-dir ..Run
python -m cli.devopsos init --helpfor the interactive initializer, orpython -m cli.scaffold_devcontainer --helpto see the legacy scaffold options and version overrides.Alternative: create the files manually
Create a
.devcontainerdirectory and add the following files:devcontainer.json:
{ "name": "DevOps-OS", "build": { "dockerfile": "Dockerfile", "context": ".", "args": {} }, "overrideCommand": false, "customizations": { "vscode": { "extensions": [ "ms-python.python", "ms-azuretools.vscode-docker", "redhat.vscode-yaml", "ms-kubernetes-tools.vscode-kubernetes-tools", "redhat.java", "vscjava.vscode-java-debug", "dbaeumer.vscode-eslint", "golang.go", "hashicorp.terraform" ] } }, "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ] }devcontainer.env.json:
{ "languages": { "python": true, "java": true, "javascript": true, "go": true }, "cicd": { "docker": true, "terraform": true, "kubectl": true, "helm": true, "github_actions": true }, "kubernetes": { "k9s": true, "kustomize": true, "argocd_cli": true, "lens": false, "kubeseal": true, "flux": true, "kind": true, "minikube": true, "openshift_cli": false }, "versions": { "python": "3.11", "java": "17", "node": "20", "go": "1.21" } } -
Open the project in VS Code and click "Reopen in Container" when prompted, or run the "Dev Containers: Reopen in Container" command from the Command Palette.
The easiest way to reconfigure the container is with the CLI:
python -m cli.scaffold_devcontainer \
--languages python,go \
--cicd-tools docker,terraform \
--kubernetes-tools k9s,flux \
--devops-tools prometheus,grafanaThis regenerates devcontainer.json and devcontainer.env.json. If you need a generated Dockerfile as well, use python -m cli.devopsos init --dir . on a fresh target.
You can also edit the generated devcontainer.env.json by hand. This file lets you specify which languages, tools, and features to include in your environment.
Enable or disable languages by setting their value to true or false:
"languages": {
"python": true,
"java": true,
"javascript": true,
"go": false
}Enable or disable various CI/CD and DevOps tools:
"cicd": {
"docker": true,
"terraform": true,
"kubectl": true,
"helm": true,
"github_actions": true
}Select which Kubernetes tools to install:
"kubernetes": {
"k9s": true,
"kustomize": true,
"argocd_cli": true,
"lens": false,
"kubeseal": true,
"flux": true
}Specify the versions of languages and tools to use:
"versions": {
"python": "3.11",
"java": "17",
"node": "20",
"go": "1.21"
}Once the container is built and running, you can:
- Use the integrated terminal in VS Code to run commands with all tools pre-installed
- Develop in any of the enabled languages with full IDE support
- Build and run containers using Docker
- Deploy to Kubernetes clusters
- Set up automated CI/CD pipelines (see companion README files)
Depending on your configuration, DevOps-OS includes:
- Languages: Python, Java, JavaScript/TypeScript, Go
- Build Tools: Maven, Gradle, npm, pip, Go tools
- Container Tools: Docker, Docker Compose
- Kubernetes: kubectl, helm, k9s, kustomize, ArgoCD CLI, Flux
- IaC: Terraform, AWS CLI, Azure CLI
- CI/CD: GitHub Actions configs, Jenkins pipelines
- Code Quality: SonarQube, ESLint, Pylint, CheckStyle
If the container fails to build:
- Check Docker is running
- Ensure you have sufficient disk space
- Review Docker build logs for specific errors
If a specific tool isn't working properly:
- Check the tool is enabled in
devcontainer.env.json - Regenerate the dev container files with
python -m cli.scaffold_devcontainer ...using the desired tool flags - Rebuild the container and check if the tool requires additional configuration
After setting up DevOps-OS, consider exploring: