Sign inSign up

hungnt612/devops-toolkit

By hungnt612

•Updated 14 days ago

All-in-one DevOps toolbox: k8s, GitOps, IaC, cloud, security & AI CLIs

Image
0

3.6K

hungnt612/devops-toolkit repository overview

⁠DevOps-Tools (All-In-One)

A single "Swiss-army-knife" container image that bundles the tools you reach for every day when working with Kubernetes, GitOps, Infrastructure-as-Code, cloud providers, supply-chain security and AI coding assistants — plus Docker-in-Docker so you can build and run containers from inside it.

The image is based on docker:24.0.2-dind-rootless⁠ (Alpine Linux) and published to Docker Hub as hungnt612/devops-toolkit⁠.

docker pull hungnt612/devops-toolkit:latest
docker run --rm -it hungnt612/devops-toolkit:latest

⁠What's inside

⁠Kubernetes
ToolPurpose
kubectl / kubecolorKubernetes CLI (colorized alias k)
helmKubernetes package manager (alias h)
kustomizeTemplate-free Kubernetes config customization
kindRun local Kubernetes clusters in Docker
k9sTerminal UI to navigate / manage clusters
kubectx / kubensFast context & namespace switching
kubesealEncrypt Secrets for Sealed-Secrets
krewkubectl plugin manager
sternMulti-pod log tailing
skaffoldLocal Kubernetes dev loops
argocdArgo CD GitOps CLI
fluxFlux CD GitOps CLI
⁠Infrastructure-as-Code & Secrets
ToolPurpose
terraformProvision infrastructure (alias tf)
terragruntThin wrapper around Terraform for DRY configs
vaultHashiCorp Vault CLI
⁠Security & supply chain
ToolPurpose
trivyVulnerability & misconfiguration scanner
cosignSign / verify container images (Sigstore)
gitleaksDetect hardcoded secrets in git repos
semgrepStatic analysis / SAST
roxctlStackRox / RHACS CLI
sonar-scanner + sonar-cnes-reportSonarQube code scanning & reporting
⁠Cloud
ToolPurpose
awsAWS CLI v2
session-manager-pluginAWS SSM Session Manager (aws ssm start-session)
eksctlCreate / manage Amazon EKS clusters
aws-iam-authenticatorEKS IAM authentication
gcloud / gsutilGoogle Cloud CLI
azAzure CLI
ocOpenShift client
⁠Git platforms
ToolPurpose
ghGitHub CLI
glabGitLab CLI
⁠Databases
ToolPurpose
mongoshMongoDB Shell (runs on the image's musl Node)
mongodump / mongorestoreMongoDB backup / restore (mongodb-tools)
⁠AI coding CLIs
ToolPurpose
claudeClaude Code CLI (@anthropic-ai/claude-code)
codexOpenAI Codex CLI (@openai/codex)
geminiGoogle Gemini CLI (@google/gemini-cli)

These run on Node.js 22 (musl), installed into /usr/local. Provide your own API keys at runtime (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY).

⁠Documents & images

For reading and processing common file formats without extra setup:

  • PDF: pdftotext, pdfinfo, pdftoppm (poppler-utils) and the pypdf Python library.
  • Word / Excel: python-docx (.docx), openpyxl (.xlsx) and pandas for tabular data.
  • Images: ImageMagick (convert, identify, mogrify) and the Pillow Python library.
⁠Misc

git, go, node/npm, python3 (+ msal, python-sonarqube-api, pypdf, python-docx, openpyxl, pandas, Pillow), jq, yq, openssl, nano (with a tuned .nanorc), vim, htop, lynx, curl, wget, and handy bash aliases/completions.

Run devops-tools-versions inside the container to print every tool's version.


⁠Build

cd DevOps-Tools
docker build -t devops-tools:latest .

ℹ️ This is a large image (multi-cloud CLIs are heavy). The Azure CLI layer in particular is slow to build — comment out the azure-cli RUN block in the Dockerfile if you don't need it.

⁠Run

# Interactive shell (shows a version banner on start)
docker run --rm -it devops-tools:latest

# Mount your kube/aws/ssh config from the host
docker run --rm -it \
  -v "$HOME/.kube:/home/rootless/.kube" \
  -v "$HOME/.aws:/root/.aws" \
  devops-tools:latest

# Use it as a one-off CLI (banner goes to stderr, so stdout stays clean)
docker run --rm devops-tools:latest kubectl version --client

Environment toggles:

VariableEffect
DEVOPS_TOOLS_NO_BANNER=1Suppress the startup banner

⁠Create a local Kubernetes cluster

The image ships a helper to spin up a kind⁠ cluster with an NGINX ingress controller:

# Inside the container
./create_cluster.sh my-cluster

config.yml configures the kind cluster (control-plane + worker, ports 80/443 exposed for ingress). config is an empty kubeconfig template.


⁠Tool versions (pinned)

Versions are pinned via ENV in the Dockerfile:

ToolVersion
Helm3.11.3
Terraform1.14.3
Terragrunt0.96.0
kind0.18.0
kubeseal0.20.2
krew0.4.3
kustomize5.8.3
k9s0.51.0
Argo CD3.5.5
Flux2.9.6
Trivy0.75.0
cosign3.1.3
gitleaks8.30.1
yq4.54.1
Google Cloud CLI588.0.0
Node.js22.23.3 (musl)
SonarScanner4.6.2.2472

kubectl, kubecolor, stern, skaffold, az, semgrep and the AI CLIs (claude, codex, gemini) track their latest release at build time. Pin the AI CLIs with the CLAUDE_CODE_VERSION, CODEX_VERSION and GEMINI_CLI_VERSION build args if you need reproducible builds.


⁠Versioning

The image is tagged on Docker Hub as follows:

TagWhenUse it for
latestevery push to mainquick start, always-current (may drift)
main-<sha>every push to maintrace an image back to an exact commit
vX.Y.Z, X.Ywhen you push a git tag vX.Y.Zreproducible, pinned releases
(custom)manual workflow_dispatchone-off ad-hoc tags

OS-CVE fixes land through a normal rebuild (the daily scan opens a PR — see below), so they ship as a new latest / main-<sha> rather than a separate tag.

Recommended flow — SemVer via git tags:

# Cut a release whenever the bundled tool set changes
git tag v1.2.0
git push origin v1.2.0      # CI builds & publishes v1.2.0, v1.2 and latest
  • Use latest for convenience / dev.
  • Pin to vX.Y.Z in anything that must be reproducible (CI runners, docs).
  • Bump the version when any tool is added, removed, or version-changed. Treat a tool-version change as a minor bump and a breaking base/behaviour change as a major bump.

⁠CI/CD

Two GitHub Actions workflows live in .github/workflows/:

devops-tools.yml — runs on PRs, pushes to main, git tags, and manual dispatch:

  1. lint — hadolint on the Dockerfile + shellcheck on the scripts.
  2. build — build the image (Buildx + GHA cache).
  3. smoke test — run devops-tools-versions inside the image and fail if any tool is MISSING, plus explicit kubectl / terraform checks.
  4. scan — Trivy for CRITICAL/HIGH (reporting by default; set the step's exit-code to 1 for a hard gate) and a CycloneDX SBOM artifact.
  5. publish — push to hungnt612/devops-toolkit with the tags above, then sync an enriched overview to the Docker Hub repository page so it is always up to date. The overview is this README plus, for the release being published, its release notes (auto-generated from commits/PRs on a git tag, or the recent commit log on main) and a Trivy security-scan summary (fixable CRITICAL/HIGH/MEDIUM counts, with a pointer to the full report in the GitHub Security tab).

devops-tools-autopatch.yml — runs daily (and on demand), against the published image rather than a fresh build:

  1. Full scan (OS + libraries) with Trivy, uploaded as SARIF to the GitHub Security tab for tracking over time, plus a console summary.
  2. Auto-fix via PR — when fixable OS-package CVEs are found, it bumps SECURITY_REFRESH in the Dockerfile and opens a PR to main (security/cve-autofix) listing the CVEs. Merging it triggers the main CI/CD workflow, which rebuilds with a fresh apk upgrade and publishes a patched image.

Scanning is scheduled (daily), not tied to builds: the published image keeps getting checked even when no new commits land. Library/app CVEs that a rebuild can't fix on their own still surface in the scan so you can bump the tool version.

Requirements for the auto-fix PR:

  • Repo setting Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests" must be enabled.
  • The PR's own build CI runs automatically only if a GH_PAT secret (a PAT with repo/workflow scope) is set; with the default token the PR is created but you merge it to trigger the publish rebuild.
⁠Required repository secret
SecretPurpose
DOCKER_HUB_TOKENDocker Hub access token (push image + update the repo overview). Login user is hungnt612.

A Repo Read & Write token is normally enough both to push images and to update the repository overview. Syncing the overview is best-effort: if Docker Hub rejects the description edit (e.g. a 403), the publish still succeeds — the publish log says so, and re-issuing the token with Read, Write & Delete scope resolves it.


⁠📦 Latest release — latest (main-7350a49)

Published 2026-10-14 09:14 UTC

⁠🔒 Security scan (Trivy — fixable OS + library CVEs)

Scanned 2026-10-14 09:14 UTC

SeverityFixable CVEs
🔴 CRITICAL59
🟠 HIGH1158
🟡 MEDIUM1405

The full vulnerability report is uploaded to the repository's GitHub Security tab (daily auto-scan), and a CycloneDX SBOM is attached to each CI run.

Tag summary

Content type

Image

Digest

sha256:728ed4caa…

Size

2.3 GB

Last updated

14 days ago

docker pull hungnt612/devops-toolkit