A Node.js module for Docker's Remote API, providing a feature-rich and stream-friendly interface to manage containers, images, and more.
Dockerode is a comprehensive Node.js library that provides programmatic access to Docker's Remote API. It enables developers to manage Docker containers, images, networks, volumes, and other Docker objects directly from Node.js applications, making it essential for building Docker-based automation, CI/CD pipelines, and orchestration tools.
Node.js developers building automation scripts, CI/CD pipelines, orchestration tools, or any application that requires programmatic control over Docker environments.
Developers choose Dockerode for its clean, intuitive API that mirrors Docker's capabilities, full coverage of the Docker Remote API with extensive testing, and support for both callback and promise-based patterns. Its helper functions like followProgress and demuxStream, along with a docker.run() method that mimics the Docker CLI, provide a seamless integration experience.
Docker + Node = Dockerode (Node.js module for Docker's Remote API)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Dockerode preserves Docker streams without breaking them, enabling advanced manipulation like demultiplexing stdout and stderr, as shown in attach examples with demuxStream.
It implements all Docker Remote API features with extensive documentation linking to official endpoints, ensuring up-to-date compatibility and testing.
The docker.run() method mimics Docker CLI behavior, simplifying common tasks like executing commands in containers with options similar to docker run.
Supports both callback-based and promise-based interfaces, catering to different coding styles and modern async/await usage, as highlighted in the philosophy.
For long-running operations like image builds, users must manually use the followProgress helper to monitor completion, adding extra steps compared to automatic handling.
Relies on the separate docker-modem library for network communication, which can complicate debugging and increase dependency management overhead.
Errors and responses are passed directly from Docker's API without higher-level abstractions, requiring deeper understanding of Docker's error patterns for effective handling.