docker-client/open-api
Autogenerated PHP OpenAPI client for the Docker Engine API. Install via Composer and use generated endpoints/models to talk to Docker over the official v1.40 spec. Versioning tracks jane-php major + Docker API major/minor + patch.
v{jane-php}.{docker-major}.{docker-minor}.{patch}) introduces ambiguity for dependency management and upgrades.composer.json), aligning with Laravel’s LTS requirements (8.0+).docker-client/open-api) without framework-specific conflicts.docker/docker-sdk-php) with active support?php artisan docker:prune)./api/containers).exec('docker ps')), but loses type safety and error handling.ContainerList, ContainerCreate, ImagePull).composer.json:
"require": {
"docker-client/open-api": "^6.1.40.0"
}
use Docker\Client;
class DockerService {
protected $client;
public function __construct() {
$this->client = new Client('http://docker-host:2375', [
'auth' => ['username' => 'user', 'password' => 'pass']
]);
}
}
curl or stream extensions are required for HTTP requests.composer.json to avoid surprises.$client = new Client('http://docker-host:2375', [
'debug' => true
]);
$client = new Client('http://docker-host:2375', [
'guzzle' => [
'timeout' => 30,
'retries' => 3
]
]);
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Docker daemon unavailable | API timeouts | Retry logic + circuit breaker |
| API version mismatch | Broken endpoints | Feature flags for deprecated APIs |
| Authentication failure | Unauthorized errors | Secure credential storage (e.g., Laravel Env) |
| Rate limiting | Throttled requests | Exponential backoff |
| Jane PHP generator bugs | Malformed API responses | Input validation + fallback to shell |
--tlsverify for secure connections).Log::debug($response)) for observability.How can I help you explore Laravel packages today?