Container image linter for security and Docker best practices
open sourceApache-2.0self-hostablefree
Dockle is a command-line linter for built container images: point it at an image name or a saved image file and it checks it against the CIS Docker Benchmark's image checkpoints and its own rules for Docker and Linux (no sudo, no latest tag, cleared apt caches, no empty passwords, no secrets in the image). Results come out by level (FATAL, WARN, INFO), as text, JSON or SARIF, with a configurable exit code, so it fits a CI step; it works with private registries such as Docker Hub, Amazon ECR and GCR. Unlike Hadolint, which lints the Dockerfile, it inspects the image itself, and it complements vulnerability scanners like Trivy.
Problems it solves
- check my Docker image for security best practices before I push it
- lint a built container image against the CIS Docker benchmark in CI
- find secrets or sudo left in a container image
Features
- CIS Docker Benchmark image checkpoints
- Dockle rules for Docker and Linux
- scan an image or an image tarball
- JSON and SARIF output
- configurable exit code and level
- ignore or accept specific checkpoints
- private registry auth
Limitations
- Checks image configuration and best practices only; it is not a CVE vulnerability scanner1
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what Dockle does.
- Trivy Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more
- Clair Vulnerability Static Analysis for Containers
- Docker Scout Finds vulnerabilities, outdated packages and compliance problems in container images
- Grype A vulnerability scanner for container images and filesystems.
- Cosign Code signing and transparency for containers and binaries
- shiplist Put every file in a repository in exactly one list, and check what ships in your Docker images and packages
