dockerode is a Node.js module that wraps Docker's Remote API with entity objects, streaming support, and helpers mirroring docker run and docker pull.
Overview
dockerode lets Node.js programs manage Docker engines through the official remote API. Containers, images, networks, volumes, services, and related objects are represented as instances with methods instead of loose static calls, and streams from Docker are passed through for demultiplexing or piping.
Typical use includes creating and controlling containers, building images (including BuildKit secrets), pulling from public or private registries, and running commands inside containers in a way analogous to docker run. Callback and promise interfaces are both supported.
Utility helpers cover following build or pull progress, demuxing stdout and stderr, and HTTP hijacking for interactive stdin and stdout. The module documents alignment with Docker API return values and ships extensive API coverage aimed at tracking upstream Docker features.
Installation is via npm and requires a supported Node.js release line. Tests and examples illustrate container lifecycle, image builds, and compose-style networking patterns.
Key features
- Docker Remote API coverage
- Container, image, and exec entities
- Stream passthrough and demux
- docker run equivalent helper
- Image build with BuildKit secrets
- Pull with private registry auth
- Promise and callback interfaces
- Progress follow helpers
Use cases
- Automating containers from Node.js
- CI image build pipelines
- Custom Docker control panels
- Remote engine administration scripts
- Orchestrating one-off container jobs