# ory/dockertest

Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.

Repository: https://github.com/ory/dockertest
Canonical: https://ross.abutalabs.com/products/dockertest
Homepage: https://www.ory.com/?utm_source=github&utm_medium=banner&utm_campaign=dockertest
Language: Go
License: Apache-2.0
License Family: permissive
Topics: go, docker, ci, tests, automation, unit-testing, integration-testing
Last push: 2026-07-17T14:03:10+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 47, longevity 100
- inputs: {"age_days": 4185, "days_push": 47, "days_rel": 141, "gap_med": 378, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4522, forks 269 (observed 2026-08-28T04:08:52.804183+00:00)

## What it is
A Go library that spins up ephemeral Docker containers (e.g., databases, message queues) for integration tests and tears them down automatically. It supports running any image from Docker Hub or built from a Dockerfile, with helpers for readiness checks, connection info, and CI usage.

## Use cases
- run integration tests against a real postgres database in Go
- spin up ephemeral docker containers for unit tests
- test services against real dependencies instead of mocks
- boot docker images from a Dockerfile during Go tests
- run docker-backed tests in GitHub Actions or GitLab CI
- automatically clean up test containers after test runs

## When to choose
- you write Go tests that need real databases or third-party services
- mocking a DBAL is too painful and you want real dependencies
- you want fast, disposable containers that are destroyed after testing
- you need docker-backed integration tests running in CI

## When to avoid
- your tests don't need external services or containers
- you are not working in Go
- you cannot run Docker in your test environment (e.g., restricted shared CI runners)
- you only need lightweight unit tests with mocks

## Facets
- artifact type: library
- maturity: active
- function: testing, e2e-testing, container-runtime, developer-tools
- domain: testing, developer-tools
- platform: go, windows, cross-platform
- tags: integration-testing, ephemeral-containers, docker-containers, go-testing, test-fixtures, ci, containers, devops, docker, linux, macos

## Member repositories
- ory/dockertest (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:52.804183+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:16.948865+00:00, confidence not recorded.
  - readme: https://github.com/ory/dockertest (fetched 2026-08-28T04:08:52.804183+00:00, sha cfa07807ad98)
  - homepage: https://www.ory.com/?utm_source=github&utm_medium=banner&utm_campaign=dockertest (fetched 2026-08-29T09:06:07.283394+00:00, sha 9cd75b156cd4)
  - site_page: https://www.ory.com/docs/welcome (fetched 2026-08-29T09:06:07.288622+00:00, sha e6f2747eb4d2)
  - site_page: https://www.ory.com/about (fetched 2026-08-29T09:06:07.292853+00:00, sha e44652fde9f9)
  - site_page: https://www.ory.com/pricing (fetched 2026-08-29T09:06:07.286245+00:00, sha 35c1d920fc8d)
  - site_page: https://changelog.ory.com/ (fetched 2026-08-29T09:06:07.290640+00:00, sha c8e6b35f30bb)
  - site_page: https://www.ory.com/integrations (fetched 2026-08-29T09:06:07.295121+00:00, sha 966475eed325)
- Data as of 2026-08-30T08:39:29.467469+00:00.
