Sign inSign up

darioajr/yaml-doctor

By darioajr

Updated about 1 year ago

Practical YAML linting and validation with score, badge and web report

Image
Developer tools
0

840

darioajr/yaml-doctor repository overview

yaml-doctor

A command to inspect your YAMLs (Kubernetes, Docker Compose, GitHub Actions), generate score, badge and a beautiful web report.

Run in 10s

docker run --rm -v "$PWD":/work -p 8080:8080 darioajr/yaml-doctor:latest
  • Report: ./yaml-doctor-report.html
  • JSON: ./yaml-doctor-report.json
  • Badge: ./yaml-doctor-badge.svg
  • Local UI: http://localhost:8080
⚠️ Windows users

Se estiver usando Docker Desktop no Windows, prefira:

docker run --rm -v "/c/caminho/para/seu/projeto:/work" -p 8080:8080 darioajr/yaml-doctor:latest

Ou, se estiver usando Git Bash:

docker run --rm -v "$(pwd):/work" -p 8080:8080 darioajr/yaml-doctor:latest

What does it check?

Common: tabs, trailing spaces, long lines, invalid parse/duplications.
Docker Compose: services, image|build, avoids :latest, suggests restart.
GitHub Actions: jobs/steps, runs-on, suggests pinning uses, suggests on.
Kubernetes: apiVersion/kind/metadata.name, avoids :latest, resources.limits, probes.

⚠️ MVP: no complete K8s schema validation (focus on speed and lightweight).

CLI (flags)

# only generate files (no server)
docker run --rm -v "$PWD":/work darioajr/yaml-doctor:latest --path /work --no-serve

# custom port
docker run --rm -v "$PWD":/work -p 9090:9090 darioajr/yaml-doctor:latest --port 9090

Demo

There are examples in ./demo for you to test and take screenshots:

cd demo
docker run --rm -v "$PWD":/work -p 8080:8080 darioajr/yaml-doctor:latest

Corporate Registry Troubleshooting

If you encounter manifest list errors in corporate environments:

# Force specific platform
docker pull --platform linux/amd64 darioajr/yaml-doctor:latest

# Or build locally
docker build -t yaml-doctor:local .
docker run --rm -v "$PWD":/work yaml-doctor:local --path /work --no-serve

License

Apache-2.0

Tag summary

Content type

Image

Digest

sha256:5e4fec527

Size

55.1 MB

Last updated

about 1 year ago

docker pull darioajr/yaml-doctor