Skip to content

Home > @opengovsg/testcontainers > ContainerConfiguration

ContainerConfiguration interface ​

Declarative description of a single container. Ported from confetti's zod schema minus buildArgs (it was declared but never applied).

Signature:

typescript
export interface ContainerConfiguration

Properties ​

PropertyModifiersTypeDescription
command?string[](Optional)
environment?Record<string, string>(Optional)
extraHosts?{ host: string; ipAddress: string; }[](Optional)
imagestring
namestringUnique name; also used as the network alias when a network is passed.
ports?(number | { container: number; host: number; })[](Optional) Ports to expose. A bare number requests a random host port; an object pins a fixed host port (the e2e reuse pattern).
reuse?boolean(Optional) withReuse() — e2e reruns share containers; Ryuk reaps them on exit.
wait?WaitStrategy(Optional)