npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

testcontainers-doctor

v1.0.0

Published

CLI diagnostic tool that instantly identifies and fixes Testcontainers environment issues

Readme

testcontainers-doctor

Stop guessing why your Testcontainers tests fail. Get a diagnosis in seconds.

npm version License: MIT Node.js ≥18


The problem

Your Testcontainers tests fail locally but pass in CI — or the other way around. The error is cryptic. You spend 30 minutes checking Docker, Java, sockets, and config files. You fix one thing and another breaks.

testcontainers-doctor runs all those checks in 3 seconds and tells you exactly what is wrong and how to fix it.


Quick start

# No install needed
npx testcontainers-doctor

# Or install globally
npm install -g testcontainers-doctor
testcontainers-doctor

What it checks

| Category | Checks | |---|---| | Docker | Daemon running, socket permissions, storage driver, client version, available memory | | Java | Version compatibility, JAVA_HOME, Maven, Gradle | | Config | .testcontainers.properties, Ryuk settings, container reuse, registry prefix, env vars | | Network | DNS resolution, Docker Hub connectivity, proxy detection, manifest pull | | Environment | OS/WSL2 detection, CI platform, ulimits, docker group membership |


Example output

  testcontainers-doctor v1.0.0
  Diagnosing your Testcontainers environment...

  Docker
  ──────────────────────────────────────────────────
    ✔  Docker daemon              Running (server version 24.0.5)
    ✔  Docker socket              /var/run/docker.sock found (mode 0666)
    ✔  Storage driver             overlay2
    ✔  Docker client version      24.0.5
    ✔  Available memory           4.2 GB free of 15.9 GB total
    ℹ  Ryuk reaper                Not running (starts automatically with first test)

  Java & Build Tools
  ──────────────────────────────────────────────────
    ✔  Java version               openjdk version "17.0.9" (major: 17)
    ⚠  JAVA_HOME                  Not set
       → Fix: export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))
    ✔  Maven                      Apache Maven 3.9.5
    ℹ  Gradle                     Not found (only needed for Gradle projects)

  Testcontainers Config
  ──────────────────────────────────────────────────
    ✔  .testcontainers.properties Found at ~/.testcontainers.properties
    ✔  ryuk.disabled              Not set — Ryuk enabled (default)
    ℹ  Container reuse            Disabled — add testcontainers.reuse.enable=true to speed up local dev
    ℹ  Image registry prefix      Not set — pulling from Docker Hub directly
    ℹ  TESTCONTAINERS_* env vars  None set
    ℹ  DOCKER_HOST                Not set — using default socket

  ────────────────────────────────────────────────────────
  14 passed  ·  1 warnings  ·  0 failed  ·  5 info
  ────────────────────────────────────────────────────────

  Environment OK with warnings — review fixes above.

CLI options

Usage: testcontainers-doctor [options]

Options:
  -V, --version         show version
  --json                output results as JSON (for CI parsing)
  --check <name>        run only one category: docker | java | config | network | env
  --no-color            disable colored output
  -h, --help            display help

CI integration

Add to your pipeline to gate tests on environment health:

# GitHub Actions example
- name: Verify Testcontainers environment
  run: npx testcontainers-doctor --json | tee tc-doctor.json

The tool exits with code 1 if any check fails, 0 if all pass (warnings are non-blocking).


Run a single category

testcontainers-doctor --check docker
testcontainers-doctor --check java
testcontainers-doctor --check config
testcontainers-doctor --check network
testcontainers-doctor --check env

JSON output

testcontainers-doctor --json
{
  "timestamp": "2026-05-03T09:00:00.000Z",
  "healthy": true,
  "summary": { "ok": 14, "warn": 1, "fail": 0, "info": 5 },
  "sections": {
    "docker": [
      { "name": "Docker daemon", "status": "ok", "message": "Running (server version 24.0.5)" }
    ]
  }
}

Common fixes

Docker daemon not running

sudo systemctl start docker
# WSL2: start Docker Desktop and enable WSL integration

Socket permission denied

sudo chmod 666 /var/run/docker.sock
# Permanent fix:
sudo usermod -aG docker $USER && newgrp docker

Java not found

sudo apt install openjdk-17-jdk
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64

Container reuse (faster local dev)

echo "testcontainers.reuse.enable=true" >> ~/.testcontainers.properties

Ryuk left-over containers in CI

echo "ryuk.disabled=false" >> ~/.testcontainers.properties

Requirements

  • Node.js 18+
  • Docker installed (for Docker checks)
  • Java installed (for Java checks — optional)

License

MIT