PHPackages                             clue/docker-react - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. clue/docker-react

ActiveLibrary[Queues &amp; Workers](/categories/queues)

clue/docker-react
=================

Async, event-driven access to the Docker Engine API, built on top of ReactPHP.

v1.6.0(3mo ago)113163.3k↓80.3%18[7 issues](https://github.com/clue/reactphp-docker/issues)[1 PRs](https://github.com/clue/reactphp-docker/pulls)1MITPHPPHP &gt;=5.3CI passing

Since Dec 8Pushed 3mo ago10 watchersCompare

[ Source](https://github.com/clue/reactphp-docker)[ Packagist](https://packagist.org/packages/clue/docker-react)[ Docs](https://github.com/clue/reactphp-docker)[ Fund](https://clue.engineering/support)[ GitHub Sponsors](https://github.com/clue)[ RSS](/packages/clue-docker-react/feed)WikiDiscussions 1.x Synced 2d ago

READMEChangelog (9)Dependencies (24)Versions (10)Used By (1)

clue/reactphp-docker
====================

[](#cluereactphp-docker)

[![CI status](https://github.com/clue/reactphp-docker/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-docker/actions)[![code coverage](https://camo.githubusercontent.com/2d45ae33b28ed0c5f14fdba645e579072cf437770a215524795c9eb258581b1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6465253230636f7665726167652d3130302532352d73756363657373)](#tests)[![installs on Packagist](https://camo.githubusercontent.com/27162efd1b7b2c945eac5593d68768ccc6d1c0c6f9ae19256063fbf50622df85/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c75652f646f636b65722d72656163743f636f6c6f723d626c7565266c6162656c3d696e7374616c6c732532306f6e2532305061636b6167697374)](https://packagist.org/packages/clue/docker-react)

Async, event-driven access to the [Docker Engine API](https://docs.docker.com/develop/sdk/), built on top of [ReactPHP](https://reactphp.org/).

[Docker](https://www.docker.com/) is a popular open source platform to run and share applications within isolated, lightweight containers. The [Docker Engine API](https://docs.docker.com/develop/sdk/)allows you to control and monitor your containers and images. Among others, it can be used to list existing images, download new images, execute arbitrary commands within isolated containers, stop running containers and much more. This lightweight library provides an efficient way to work with the Docker Engine API from within PHP. It enables you to work with its images and containers or use its event-driven model to react to changes and events happening.

- **Async execution of Actions** - Send any number of actions (commands) to your Docker daemon in parallel and process their responses as soon as results come in. The Promise-based design provides a *sane* interface to working with out of order responses.
- **Lightweight, SOLID design** - Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough)and does not get in your way. This library is merely a very thin wrapper around the [Docker Engine API](https://docs.docker.com/develop/sdk/).
- **Good test coverage** - Comes with an automated tests suite and is regularly tested in the *real world*.

**Table of contents**

- [Support us](#support-us)
- [Quickstart example](#quickstart-example)
- [Usage](#usage)
    - [Client](#client)
        - [Commands](#commands)
        - [Promises](#promises)
        - [Blocking](#blocking)
        - [Command streaming](#command-streaming)
        - [TAR streaming](#tar-streaming)
        - [JSON streaming](#json-streaming)
- [Install](#install)
- [Tests](#tests)
- [License](#license)

Support us
----------

[](#support-us)

I maintain an ecosystem of open-source projects that have been downloaded hundreds of millions of times and are actively maintained and continuously improved. If you find any of these projects useful, please consider [becoming a sponsor on GitHub](https://github.com/sponsors/clue). Your support helps ensure long-term maintenance and continued development. Thank you! 🚀

Quickstart example
------------------

[](#quickstart-example)

Once [installed](#install), you can use the following code to access the Docker API of your local docker daemon:

```
