webproject-xyz / docker-api-client
A PHP docker API client generated from docker api swagger schema with jane
Installs: 5 903
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 4
pkg:composer/webproject-xyz/docker-api-client
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
- jane-php/open-api-runtime: ^7.10.4
- phpdocumentor/reflection-docblock: ^6.0.1
- phpstan/phpdoc-parser: ^2.3.2
- symfony/console: ^7.4.3 || ^8.0
- symfony/http-client: ^7.4.3 || ^8.0
- symfony/http-client-contracts: ^3.6
- symfony/property-access: ^7.4.3 || ^8.0
- symfony/property-info: ^7.4.3 || ^8.0
- symfony/runtime: ^7.4.1 || ^8.0
- symfony/serializer: ^7.4.3 || ^8.0
Requires (Dev)
- codeception/codeception: ^5.3.4
- codeception/module-asserts: ^3.3.0
- codeception/module-phpbrowser: ^4.0.0
- friendsofphp/php-cs-fixer: 3.94.0
- jane-php/open-api-3: ^7.10.4
- roave/security-advisories: dev-latest
- symfony/var-dumper: 7.4.0 || ^8.0
This package is auto-updated.
Last update: 2026-02-17 00:47:21 UTC
README
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.