Skip to content

FAQ

Short answers to the questions people ask before they adopt docker-doctor.

On this page

Do I need Docker installed?

No. docker-doctor reads your Dockerfiles and Compose files as text. It never builds, pulls or runs an image, so it works on a laptop without Docker, in a CI job without a daemon and inside a sandbox.

What do I need to run it?

Node.js 22.18 or later. npx @docker-doctor/cli@latest downloads the CLI and runs it. bunx @docker-doctor/cli@latest works too.

Does it send my code or usage data anywhere?

No. The CLI has no telemetry and the scan makes no network requests. npx fetches the package from the npm registry, and that is the only download.

One optional step does share the report. After an interactive scan you can hand the findings to a coding agent on your machine. That agent sends them to its model provider like any other prompt. docker-doctor asks first and never does this in CI.

Which files does it scan?

Dockerfile, Dockerfile.*, *.dockerfile, and Compose files named compose.yaml or docker-compose.yaml with their variants. It does not scan a Containerfile or other names. Getting Started has the full table.

Does it fix the problems it finds?

Not by itself. Every finding has a Help: line with the fix. rules explain <rule> prints the same fix with the rule's category, default severity and description, and each rule's page under Rules has the full explanation with examples. To have the fixes applied for you, install the agent skill. Your coding agent then scans, edits the files and scans again to confirm the findings it targeted are gone.

How do I turn a rule off?

Set it to "off" in a config file. You can also turn off a whole category, or ignore files with a glob.

# docker-doctor.config.yaml
rules:
  "docker-doctor/require-labels": "off"
ignore:
  files:
    - "examples/**"

To silence one finding and keep the rule on everywhere else, write an inline ignore comment at the line it points to. The report still lists the finding under suppressed, and it counts toward neither the score nor the exit code. The comment covers every finding of that rule on that instruction, so keep a placeholder and a real value on separate instructions when only one of them should be ignored.

# docker-doctor-ignore no-secrets-in-env -- local-only placeholder, never deployed
ENV DB_PASSWORD=hunter2

Will it fail my build?

By default a finding fails the build only when it has error severity. --fail-on warning, --fail-on info and --fail-on none move that threshold. --baseline with a saved --json report fails the build only on findings that report does not have, so a project with findings today can use a strict threshold. See Baseline. Out of the box four rules have error severity: secrets in ENV or ARG, privileged Compose services, Docker socket mounts and references to an undeclared model. Under the default, warnings and info findings lower the score and never change the exit code. The CLI also exits 2 when it cannot read or parse a file it found. The GitHub Action is advisory by default and fails a pull request only after you raise its blocking input.

Does a repository with many Docker files score lower?

No. The score averages the penalty over the files docker-doctor analyzed, so it describes a typical file. Twenty files with two warnings each score the same as one file with two warnings. Releases before 0.7.0 added the findings up, which pushed large repositories toward 0. Scoring explains the formula.

How is it different from hadolint?

hadolint goes deep on Dockerfiles and lints the shell code inside RUN. About half of docker-doctor's Dockerfile rules overlap with it. docker-doctor adds Compose rules, build cache order, a health score and a skill for coding agents. See the comparison.

Can I use it outside GitHub?

Yes. It is one command with stable exit codes. See Other CI and Git Hooks for GitLab CI, generic pipelines and pre-commit.

Can I add my project to the leaderboard?

Yes. The leaderboard is built from a public list of repositories. Open a pull request against docker-doctor-benchmarks that adds your repository to repos.yaml.

Is it free?

Yes. docker-doctor is open source under the MIT license.