Download the PHP package stage1/docker-php without Composer

On this page you can find all versions of the php package stage1/docker-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package docker-php

Docker PHP

Docker PHP (for lack of a better name) is a Docker client written in PHP. This library aims to reach 100% API support of the Docker Engine.

Documentation Latest Version Total Downloads

Documentation

The version 4.x documentation is available. Its source lives in DOCUMENTATION.md to preview and edit it locally. The legacy documentation remains available for earlier releases.

New maintainers

After this repository was archived in 2019, the code was forked in beluga-php/docker-php, where maintenance and improvements continued.

We later contacted joelwurtz and agreed to take over maintenance of the original docker-php/docker-php repository to give you a better upgrade path. Development will continue here, and we will archive beluga-php/docker-php once the migration is complete.

Version 4.0 works with Docker Engine API v1.45 to v1.56. See Upgrading to 4.0 below for how to migrate from existing releases.

Requirements

Installation

Composer also installs docker-php/docker-php-api, choosing the newest API line unless you require one. See Docker API versions.

Usage

Endpoint methods return generated models where the API defines a response body. Their PHPDoc lists accepted parameters, return types and API exceptions.

Docker::create() connects through unix:///var/run/docker.sock by default. Environment variables are optional. See connection settings and the Guzzle examples for custom sockets, remote daemons and TLS configuration.

For streaming output, see container logs, command output and the streaming reference. These guides cover callback streams, TTY output and raw response framing.

Docker API versions

Each Docker Engine API version has its own docker-php/docker-php-api line with generated endpoints and models. The line uses the four-part version Jane-major.Docker-major.Docker-minor.revision: 7.1.56.0 means Docker API 1.56, generated with Jane 7, revision 0. To use a specific version, require its line:

Pin a line if your code names generated models or calls methods that differ between versions. See the official Docker Engine API reference for each version's endpoints, parameters and response schemas.

The bundled connection factory negotiates the version in request URLs: it uses the lower of the installed line and the daemon's maximum API version, as the Docker CLI does. DOCKER_API_VERSION or the factory's api_version option fix the version instead. Changing the URL version does not change the generated models. See API versions.

Upgrading to 4.0

Most applications come from the original docker-php 2.x client or from beluga-php/docker-php 1.45.x. Follow the section for your current package, then check the 3.x changes, because 4.0 also changes defaults that 2.x and Beluga applications rely on.

From docker-php 2.x

Version 4.0 requires PHP 8.1 or later, PSR-7 v2 and Jane 7-generated models. Review endpoint signatures, model types and HTTP client dependencies before upgrading. Check log and exec consumers against the streaming documentation.

Change the client requirement to docker-php/docker-php:^4.0. Remove an explicit docker-php/docker-php-api:4.1.* requirement, or change it to one API line as shown above. Update dependencies, test your application and commit its updated composer.lock.

From beluga-php

Version 4.0 continues the client maintained under beluga-php/docker-php. The PHP namespaces remain Docker and Docker\API.

Remove the beluga-php/docker-php requirement and any explicit beluga-php/docker-php-api requirement from composer.json. Add docker-php/docker-php:^4.0; to keep the Beluga v1.45 models, also require docker-php/docker-php-api:>=7.1.45.0 <7.1.46.0. Resolve the package changes together, then test the application and commit its updated composer.lock.

Install one package family at a time: the Beluga and original packages contain the same PHP classes.

From docker-php 3.x

Applications that cannot upgrade yet can stay on ^3.3. See the upgrade guide for model changes between API versions.

Development

Install dependencies and pull the image used by the integration tests:

Run the test suite and static analysis:

The integration tests create Docker resources on the configured daemon. Use a development daemon when running them. See CONTRIBUTING.md for contribution instructions.

Credits

Docker PHP was created by Geoffrey Bachelet and Joel Wurtz. Development continued under beluga-php before the return to the original repositories.

License

MIT.


All versions of docker-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
docker-php/docker-php-api Version >=7.1.45.0 <7.1.58.0
nyholm/psr7 Version ^1.8
php-http/client-common Version ^2.7
php-http/discovery Version ^1.19
php-http/socket-client Version ^2.3
psr/http-message Version ^2.0
symfony/filesystem Version ^6.3 || ^7.0 || ^8.0
symfony/process Version ^6.3 || ^7.0 || ^8.0
symfony/serializer Version ^6.3 || ^7.0 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stage1/docker-php contains the following files

Loading the files please wait ...