Docker PHP Client is a modern, object-oriented library for interacting with the Docker API using PHP. The library provides a convenient and type-safe interface for working with Docker containers, images, networks, volumes, and system functions.
composer require sangezar/docker-php-client
use Sangezar\DockerClient\DockerClient;
// Create a client connecting to local Docker daemon
$client = DockerClient::createUnix();
// List all containers
$containers = $client->container()->list(['all' => true]);
// Get Docker system information
$info = $client->system()->info();