Add a `doctor` command

Open
#1,572 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, node.js, typescript
Domain
cli, devtools

Research direction

Start with the package manifest at packages/testcontainers/package.json and the bug report template at .github/ISSUE_TEMPLATE/bug_report.md. Read the work in #1571 for per-strategy rejection reasons and coordinate with #1569 on effective configuration. Done means the new npx testcontainers doctor command prints the listed runtime, configuration, registry, Ryuk, Compose, Node, and platform details, and the bug report template asks for its output.

Written by the indexing model from the issue text.

Description

enhancement minor

What happens

Diagnosing an environment problem means reading debug logs. The bug report template asks for the full DEBUG=testcontainers* output plus the OS, runtime, Node version and test runner, typed in by hand. There is no single place that shows what Testcontainers detected.

Expected

A command that prints a diagnosis that can be pasted into an issue:

npx testcontainers doctor
  • the runtime strategy chosen, and why the others were rejected
  • host, socket path, host IPs, runtime name and version
  • which configuration is in effect, from environment variables and .testcontainers.properties
  • whether registry credentials were found for the default registry
  • whether Ryuk can be started and reached
  • whether Docker Compose is available, and its version
  • Node version and platform

The bug report template then asks for this output.

Where

  • a new bin entry in packages/testcontainers/package.json
  • .github/ISSUE_TEMPLATE/bug_report.md

Notes

  • The package has no bin today.
  • The same data could be exposed as a function for use in a test setup file.

Dependencies

  • Blocked by #1571: it prints the per-strategy reasons that issue collects.
  • Coordinate with #1569: for reporting the effective configuration.
Dominant language
TypeScript
Stars
2.7k
Forks
290
Avg merge
4d 1h
Merged PRs (30d)
22

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testcontainers/testcontainers-node

All issues in testcontainers/testcontainers-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.