Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Docker Php Api

Docker Php Api Laravel Package

docker-php/docker-php-api

Generated OpenAPI client for the Docker API, produced with Jane OpenAPI. This package is no longer maintained; use docker-php instead. It does not follow semver—versions track Jane and Docker API versions, so pin the first three numbers.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Docker Php Api
What is docker-php/docker-php-api?
It is a PHP client for the Docker Engine API generated from Docker's OpenAPI specification using the Jane OpenAPI generator. Instead of hand-written method wrappers, you get generated, type-safe request and response classes covering the Docker endpoints. The README explicitly advises against using it directly and points you to docker-php/docker instead.
Is docker-php/docker-php-api abandoned or still maintained?
The README still carries a 'No longer maintained' notice asking for someone to take over the repository, but releases have continued at a low cadence, including a version line targeting Docker Engine API v1.56. Recent releases have been chore-only, so it is fairest to describe it as maintained at low cadence rather than actively developed. Confirm the upstream deprecation notice status yourself before adopting it.
Does docker-php/docker-php-api work with Laravel?
It is framework-agnostic generated code: there is no service provider, facade, config publishing or queue/event hooks, so nothing is auto-discovered. You can use it inside a Laravel application, but you write all the glue yourself, including binding the client in the container, configuring the endpoint and mapping exceptions. That missing Laravel surface is the dominant integration cost, not the age of the code.
How do I install docker-php/docker-php-api with Composer?
Run composer require docker-php/docker-php-api, ideally with an explicit constraint rather than a floating version. Because the package does not follow semver, pin at least the first three numbers, for example 7.1.56.* or >=7.1.56.0 <7.1.57.0. You will also need a PSR-18 compatible HTTP client implementation in your project.
Why doesn't docker-php/docker-php-api follow semver?
The version numbers are structured rather than arbitrary: the first number is the Jane OpenAPI major used to generate the files, the second and third track the Docker API version, and the last is a revision of that build. So 7.1.56.3 means Jane 7.x generating Docker Engine API 1.56, revision 3. Pin at least the first three numbers and treat crossing an API line as a deliberate, tested upgrade rather than a patch bump.
Which Docker Engine API version does docker-php/docker-php-api target?
The current 7.1.56.x line targets Docker Engine API v1.56, and the maintainers publish an explicit constraint window of >=7.1.56.0 <7.1.57.0. Older version lines map to older API versions, so the API surface you get is determined entirely by the version you pin. Check the daemon version running on your hosts before picking a line.
How do I connect docker-php/docker-php-api to the Docker daemon?
You instantiate the generated client with a PSR-18 HTTP client and a base URI, then point it at the daemon over TCP or the Unix socket. Most PSR-18 clients do not speak Unix sockets natively, so you usually need a socket-capable client or a small proxy in front of /var/run/docker.sock. In Laravel, bind the configured client as a singleton so it is not rebuilt on every call.
Does docker-php/docker-php-api support retries, connection pooling or async requests?
No. Jane-generated clients are thin, synchronous, unopinionated wrappers over the spec, with no retry semantics, pooling or async support built in. Any resilience has to come from the PSR-18 client you inject or from a wrapper you write yourself. This is one area where docker-php/docker provides more out of the box.
What are the alternatives to docker-php/docker-php-api in a Laravel app?
docker-php/docker is the usual recommendation when you want a fuller SDK surface, though you should verify its Docker API version coverage against this package's v1.56 line. For a handful of endpoints, a thin typed wrapper over Laravel's HTTP client pointed at the Docker socket is often lower total cost and gives you native retries, logging and test fakes. For CLI-shaped operations, the Process component avoids generated code entirely.
How do I test code that uses docker-php/docker-php-api?
The package ships no test doubles or fakes, so mock at the HTTP boundary by injecting a fake PSR-18 client that returns canned Docker API responses. If you wrap the generated client behind a small interface of your own, you can bind a stub in Laravel's container and keep your tests free of HTTP altogether. Avoid hitting a real daemon in unit tests and reserve that for integration suites.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dakiquang/laravel-oauth-refresh-lock
woda/laravel-worktrees
dalefranks/ramasite
faghy/laracashbook
roundly-consulting/google-places-for-laravel
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
adachsoft/changelog-linter