webproject-xyz/docker-api-client

A PHP docker API client generated from docker api swagger schema with jane

Installs: 5 992

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/webproject-xyz/docker-api-client

1.3.3 2026-02-20 20:52 UTC

This package is auto-updated.

Last update: 2026-02-24 01:55:48 UTC


README

CI Release PHP Version Latest Stable Version Total Downloads License

A modern PHP client for the Docker Engine API (v1.51+), built with JanePHP.

💻 Usage

Initialize Service

use WebProject\DockerApiClient\Client\DockerApiClientWrapper;
use WebProject\DockerApiClient\Service\DockerService;

$service = new DockerService(
    DockerApiClientWrapper::create('http://localhost', '/var/run/docker.sock')
);

Manage Containers

// List and inspect containers
foreach ($service->findAllContainer() as $container) {
    echo "{$container->getName()}: " . ($container->running ? 'Running' : 'Stopped') . "
";
    
    // Extract env-based URLs
    $urls = $container->extractUrlsFromEnvVars(['VIRTUAL_HOST']);
}

CLI Support

bin/docker-api docker:list-containers

🤝 Contributing

Pull Requests are welcome.

📄 License

MIT License.