Skip to main content
Docker PHP is a PHP client for the Docker Engine API. It provides generated endpoint methods and models, connection handling, and decoded log and command output streams.
These docs cover the upcoming Docker PHP 3.0 client and Docker API package 7.1.45.0. Neither release has been published yet. The docs are still being prepared; installation commands for stable versions apply after release.
The first restored release targets Docker Engine API v1.45. The PHP namespaces remain Docker and Docker\API, including for applications migrating from Beluga.

Install the client

Check the requirements and make your first request.

Upgrade to 3.0

Migrate from the original packages or Beluga.

Read container output

Consume stdout and stderr without Docker frame headers.

Choose an API version

Understand package versions and daemon compatibility.

Configure a container

Set up mounts, published ports, labels and restart policies.

Handle unusual calls

Find the right approach for streams, archives and blocking calls.
Development continues in docker-php/docker-php. The generated API is maintained in docker-php/docker-php-api.