> ## Documentation Index
> Fetch the complete documentation index at: https://docker-php.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker PHP

> Use the Docker Engine API from PHP.

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.

> [!NOTE]
>
> These docs cover the Docker PHP 4.1 client, which works with Docker Engine API
> v1.45 to v1.57. Upgrading from the original
> [docker-php 2.x](https://docker-php.mintlify.site/migration.md#from-the-original-2-x-client) client,
> [beluga-php/docker-php](https://docker-php.mintlify.site/migration.md#from-beluga) or
> [docker-php 3.x](https://docker-php.mintlify.site/migration.md#from-3-x)? Start with the upgrade guide.

Choose a Docker API version by installing its
[API package line](https://docker-php.mintlify.site/api-versions.md); requests negotiate with the daemon. The PHP
namespaces remain `Docker` and `Docker\API`, including for applications
migrating from Beluga.

> [card] [Install the client](https://docker-php.mintlify.site/installation.md)
>
> Check the requirements and make your first request.

> [card] [Upgrade to 4.0](https://docker-php.mintlify.site/migration.md)
>
> Migrate from docker-php 2.x, Beluga or 3.x.

> [card] [Read container output](https://docker-php.mintlify.site/guides/logs.md)
>
> Consume stdout and stderr without Docker frame headers.

> [card] [Choose an API version](https://docker-php.mintlify.site/api-versions.md)
>
> Understand package versions and daemon compatibility.

> [card] [Configure a container](https://docker-php.mintlify.site/cookbook/container-config.md)
>
> Set up mounts, published ports, labels and restart policies.

> [card] [Handle unusual calls](https://docker-php.mintlify.site/reference/streams.md)
>
> Find the right approach for streams, archives and blocking calls.

Development continues in [docker-php/docker-php](https://github.com/docker-php/docker-php).
The generated API is maintained in [docker-php/docker-php-api](https://github.com/docker-php/docker-php-api).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.