Manages stopped Docker Compose environments for testing with Testcontainers.
// Source: https://github.com/testcontainers/testcontainers-node | License: MIT | Copyright 2018 - 2025 Cristian Greco
// Provided via justclaw.it.com; keep this notice with the code.
import { type ComposeDownOptions, type ComposeOptions, getContainerRuntimeClient } from "../container-runtime";
import { DownedDockerComposeEnvironment } from "./downed-docker-compose-environment";
export class StoppedDockerComposeEnvironment {
constructor(private readonly options: ComposeOptions) {}
public async down(options: Partial<ComposeDownOptions> = {}): Promise<DownedDockerComposeEnvironment> {
const client = await getContainerRuntimeClient();
const resolvedOptions: ComposeDownOptions = { timeout: 0, removeVolumes: true, ...options };
await client.compose.down(this.options, resolvedO
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key