graywings/docker-client

Docker API client for PHP.

dev-main 2025-04-21 08:52 UTC

This package is auto-updated.

Last update: 2025-04-21 08:53:01 UTC


README

Latest Stable Version PHP Version Require codecov

Docker Client for PHP

A PHP client library for Docker API

Overview

This library provides a client for easily interacting with the Docker API from PHP. It offers interfaces for managing Docker resources such as containers, images, networks, and volumes.

Requirements

  • PHP 8.4 or higher
  • ext-curl
  • Docker engine API 1.48 or higher

Installation

Install using Composer:

composer require graywings/docker-client

Usage

use Graywings\DockerClient\DockerClient;

$client = new DockerClient();
$containers = $client->getContainers()

Development

Setup

  1. Clone the repository
  2. Install dependencies: composer install
  3. Run tests: composer test

Testing

# Run all tests with coverage report
composer test:all

# Run tests without coverage report
composer test:no-report

Code Quality

# Run all linters
composer lint

# Individual linters
composer lint:phpstan  # Static analysis with PHPStan
composer lint:phpcs    # Code style check with PHP_CodeSniffer
composer lint:phpcbf   # Code style fix with PHP_CodeSniffer
composer lint:psalm    # Static analysis with Psalm

License

MIT

Author