# testcontainers

> Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container

Latest version **12.1.0** (published 2026-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install testcontainers
pnpm add testcontainers
yarn add testcontainers
bun add testcontainers
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 12.1.0 |
| Published | 2026-08-04 |
| First published | 2018-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 22.22 |
| Dependencies | 15 |
| Unpacked size | 249.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2604 |
| Author | Cristian Greco |
| Maintainers | cristianrgreco |
| Keywords | testcontainers, docker, testing |

## Links

- npm: https://www.npmjs.com/package/testcontainers
- Repository: https://github.com/testcontainers/testcontainers-node
- Homepage: https://github.com/testcontainers/testcontainers-node#readme
- Issues: https://github.com/testcontainers/testcontainers-node/issues
- npm.io page: https://npm.io/package/testcontainers

## Dependencies (15)

- [tmp](https://npm.io/package/tmp.md) ^0.2.7
- [debug](https://npm.io/package/debug.md) ^4.4.3
- [byline](https://npm.io/package/byline.md) ^5.0.0
- [tar-fs](https://npm.io/package/tar-fs.md) ^3.1.3
- [undici](https://npm.io/package/undici.md) ^8.9.0
- [archiver](https://npm.io/package/archiver.md) ^7.0.1
- [get-port](https://npm.io/package/get-port.md) ^5.1.1
- [dockerode](https://npm.io/package/dockerode.md) ^5.0.1
- [async-lock](https://npm.io/package/async-lock.md) ^1.4.1
- [docker-compose](https://npm.io/package/docker-compose.md) ^1.4.2
- [proper-lockfile](https://npm.io/package/proper-lockfile.md) ^4.1.2
- [@types/dockerode](https://npm.io/package/@types/dockerode.md) ^4.0.1
- [properties-reader](https://npm.io/package/properties-reader.md) ^3.0.1
- [@balena/dockerignore](https://npm.io/package/@balena/dockerignore.md) ^1.0.2
- [ssh-remote-port-forward](https://npm.io/package/ssh-remote-port-forward.md) ^1.0.4

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 12.1.0 (latest) — 2026-08-04
- 9.12.0-beta.0 (beta) — 2023-07-20
- 12.0.4 — 2026-06-29
- 12.0.3 — 2026-06-17
- 12.0.2 — 2026-06-12
- 12.0.1 — 2026-05-27
- 12.0.0 — 2026-05-19
- 11.14.0 — 2026-04-08
- 11.13.0 — 2026-03-17
- 11.12.0 — 2026-02-17
- 11.11.0 — 2025-12-27
- 11.10.0 — 2025-12-09
- 11.9.0 — 2025-11-27
- 11.8.1 — 2025-11-11
- 11.8.0 — 2025-11-05
- … 283 more at https://npm.io/package/testcontainers/versions

## README

# Testcontainers

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=116414510&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=EastUs)

[![Test](https://github.com/testcontainers/testcontainers-node/actions/workflows/checks.yml/badge.svg?branch=main)](https://github.com/testcontainers/testcontainers-node/actions/workflows/checks.yml)
[![npm version](https://badge.fury.io/js/testcontainers.svg)](https://www.npmjs.com/package/testcontainers)
[![npm version](https://img.shields.io/npm/dm/testcontainers.svg)](https://www.npmjs.com/package/testcontainers)

![Testcontainers Banner](https://github.com/testcontainers/testcontainers-node/raw/main/docs/site/logo.png)

## [📖 Documentation](https://node.testcontainers.org/)

## License

See [LICENSE](https://github.com/testcontainers/testcontainers-node/blob/main/LICENSE).

## Copyright

Copyright (c) 2018 - 2025 Cristian Greco and other authors.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for how to contribute to this repo.

See [contributors](https://github.com/testcontainers/testcontainers-node/graphs/contributors/) for all contributors.

---

Join our [Slack workspace](https://slack.testcontainers.org/) | [Testcontainers OSS](https://java.testcontainers.org/) | [Testcontainers Cloud](https://www.testcontainers.cloud/)

---
_Source: https://npm.io/package/testcontainers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
