DevOps Docker & DevContainer
ยท 4 min read
Overviewโ
The nnthanh101/terraform:latest Docker image is a secure, lightweight, and production-ready environment tailored for modern CloudOps and DevOps workflows. Built on Chainguard's Wolfi Linux, this image incorporates best practices for multi-cloud, Infrastructure-as-Code (IaC), and Kubernetes ecosystem management.
Designed to meet the demands of multi-cloud environments and enterprise-grade automation, it includes tools for provisioning, configuration management, orchestration, and secrets management. The devops tag extends its functionality with Kubernetes tooling, making it ideal for hybrid-cloud operations.
Tags and Variantsโ
| Tag | Description |
|---|---|
latest | Core DevOps tools (e.g., Terraform, Git, AWS CLI, Azure CLI, and linters like TFLint/Tfsec). |
devops | Includes latest + Kubernetes ecosystem tools (kubectl, helm, kustomize, k9s) and Go. |
Key Featuresโ
| โ | Feature | Description | Relevance |
|---|---|---|---|
| โ | Security | Built on Chainguard's Wolfi Linux for minimal attack surface and compliance. | Chainguard Wolfi |
| โ | Multi-Cloud Management | Integrated AWS CLI, Azure CLI, and Boto3 SDK for managing multi-cloud environments. | AWS CLI Docs |
| โ | Kubernetes Ecosystem | Supports Kubernetes management with kubectl, Helm, and Kustomize (available in devops tag). | Kubernetes Docs |
| โ | Infrastructure-as-Code | Includes Terraform and linters like TFLint and Tfsec for compliance and validation. | Terraform Docs |
| โ | Interactive Automation | Pre-configured with Starship and Task for modern shell and task automation. | Starship Docs |
Pre-installed Toolsโ
Core DevOps Utilitiesโ
| โ | Tool | Category | Description | Relevant URL |
|---|---|---|---|---|
| โ | terraform | Infrastructure-as-Code | Automate the provisioning of cloud resources. | Terraform Docs |
| โ | terraform-docs | Documentation | Auto-generate documentation for Terraform modules. | Terraform Docs |
| โ | tflint | Validation | Linter for validating Terraform configurations. | TFLint Docs |
| โ | tfsec | Security Analysis | Static analysis for Terraform configurations. | Tfsec Docs |
| โ | atlantis | Collaboration | Terraform collaboration and CI/CD integration for pull requests. | Atlantis Docs |
| โ | vault | Secrets Management | Manage secrets and sensitive data securely. | Vault Docs |
Kubernetes Ecosystem (Available in devops Tag)โ
| โ | Tool | Category | Description | Relevant URL |
|---|---|---|---|---|
| โ | kubectl | Kubernetes CLI | Command-line tool for Kubernetes cluster management. | Kubectl Docs |
| โ | helm | Package Manager | Manage Kubernetes applications with Helm charts. | Helm Docs |
| โ | kustomize | Configuration | Manage Kubernetes YAML configurations. | Kustomize Docs |
| โ | k9s | Kubernetes TUI | Interactive terminal UI for managing Kubernetes clusters. | K9s Docs |
Cloud Managementโ
| โ | Tool | Category | Description | Relevant URL |
|---|---|---|---|---|
| โ | awscli | Cloud Management | Command-line tools for managing AWS resources. | AWS CLI Docs |
| โ | azure-cli | Cloud Management | Command-line tools for managing Azure resources. | Azure CLI Docs |
Usageโ
Pull the Imageโ
docker pull nnthanh101/terraform:latest
docker pull nnthanh101/terraform:devops
Run the Containerโ
Using the latest Tagโ
docker run -it --rm nnthanh101/terraform:latest bash
Using the devops Tagโ
docker run -it --rm nnthanh101/terraform:devops bash
Extend the Imageโ
To add custom utilities or extensions:
FROM nnthanh101/terraform:devops
COPY requirements.txt /workspace/requirements.txt
RUN pip install --no-cache-dir -r /workspace/requirements.txt
Improvements and Recommendationsโ
1. Enhanced Configurationโ
- Secure Secrets Management: Utilize Vault with automated authentication to AWS or Azure.
- Extend Aliases:
alias k='kubectl'
alias tf='terraform'
alias tfs='tfsec'
2. Efficient Multi-Cloud Operationsโ
- Ensure integration with cloud management tools for seamless cross-cloud deployments.
Directory Structureโ
.
โโโ Dockerfile ## Main Dockerfile for building the image
โโโ start.sh ## Startup script to initialize services
โโโ alias.sh ## Aliases for productivity
โโโ .config/
โ โโโ starship.toml ## Starship shell configuration
โโโ Taskfile.yaml ## Task automation script
Contributionโ
We welcome contributions to improve this image! Follow these steps:
- Fork the repository.
- Create a feature branch.
- Submit a pull request with a detailed description.
