Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@pokujs/docker

pokujs0MIT1.0.0TypeScript support: included

🐳 A minimal API to assist tests that require containers or tests that run inside containers.

🐷, poku, pokujs, testing, testcontainers, integration, e2e, end-to-end, docker, docker-compose, dockerfile, container, containers

readme

Poku's Logo

@pokujs/docker

Enjoying Poku? Give him a star to show your support 🌟


📘 Documentation


🐳 @pokujs/docker is a minimal API to assist tests that require containers or tests that run inside containers.

[!TIP]

It can be used both with or without Poku test runner.


Quickstart

Install

# Node.js
npm i -D @pokujs/docker
# Bun
bun add -d @pokujs/docker
# Deno (optional)
deno add npm:@pokujs/docker

Docker Compose

import { docker } from '@pokujs/docker';

const compose = docker.compose();

// Starts the container(s)
await compose.up();

/**
 * Tests come here 🧪
 */

// Stops the container(s)
await compose.down();

Dockerfile

import { docker } from '@pokujs/docker';

const dockerfile = docker.dockerfile({
  containerName: 'container-name',
  tagName: 'image-name',
});

// Builds the image from the Dockerfile
await dockerfile.build();

// Starts the container
await dockerfile.start();

/**
 * Tests come here 🧪
 */

// Stops and removes both the container and image
await dockerfile.remove();

changelog

Changelog

1.0.0 (2025-11-19)

Features

  • introduce @pokujs/docker package (25fa6f9)