PHPackages                             eloquage/docker-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. eloquage/docker-php

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

eloquage/docker-php
===================

Docker Engine API client for Laravel with a built-in Livewire management UI. Connect via Unix socket, TCP, or TLS. Manage containers, images, networks, volumes, and Swarm from code or the included Flux UI.

1.1.0(3mo ago)02MITPHPCI passing

Since Feb 7Pushed 3mo agoCompare

[ Source](https://github.com/eloquage/docker-php)[ Packagist](https://packagist.org/packages/eloquage/docker-php)[ Docs](https://github.com/eloquage/docker-php)[ RSS](/packages/eloquage-docker-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (4)Used By (0)

Docker PHP
==========

[](#docker-php)

[![PHP 8.4](https://camo.githubusercontent.com/6aba2f39404d8f43f8e7d11c46811ad7d1392045ba0eb8a9a274c6cd5762031d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://www.php.net/)[![Laravel 12](https://camo.githubusercontent.com/571f215e57600f999714384164ff48ed9527f3c1c02c65a5465a5feaf00e4c55/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com)[![Tests](https://github.com/eloquage/docker-php/actions/workflows/tests.yml/badge.svg?style=flat-square)](https://github.com/eloquage/docker-php/actions/workflows/tests.yml)[![License](https://camo.githubusercontent.com/a5ef38ce12409ca6dfc9fda4580ff401a6dc2218ffadf33d27c9c506e35cdbcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656c6f71756167652f646f636b65722d7068703f7374796c653d666c61742d737175617265)](license.md)[![Packagist](https://camo.githubusercontent.com/aefb36553b9f8015315778479edc3ef7f14df920cec429fdf5cca6f4a976df2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6f71756167652f646f636b65722d7068703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eloquage/docker-php)[![Downloads](https://camo.githubusercontent.com/69aad77becfd465d1b03ac75a9e736509fb2ab13e4c562a5a586dbc1d0e7d5b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6f71756167652f646f636b65722d7068703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eloquage/docker-php)

**A comprehensive Docker Engine API client for Laravel with a built-in Livewire management UI.**

Connect to your Docker daemon via Unix socket, TCP, or TLS. Use the fluent API in code or the included UI to manage containers, images, networks, volumes, and Swarm.

---

Features
--------

[](#features)

### 🔌 Full API Coverage

[](#-full-api-coverage)

100+ endpoints across the Docker Engine API v1.53 — containers, images, networks, volumes, Swarm, services, nodes, tasks, secrets, configs, plugins, build, exec, and distribution.

### 🖥️ Built-in Livewire UI

[](#️-built-in-livewire-ui)

15 ready-to-use management components styled with Flux UI and dark mode support. Browse your dashboard, containers, images, networks, volumes, and the full Swarm surface — all from the browser.

### ⚡ Real-time Streaming

[](#-real-time-streaming)

Watch image pulls with live progress bars powered by Server-Sent Events. Stream container logs and stats with multiplexed stream decoding built in.

### 🧩 Type-safe DTOs

[](#-type-safe-dtos)

First-class Data Transfer Objects for list and inspect responses — `ImageSummary`, `ContainerSummary`, `SystemInfo`, `DiskUsage`, and more — so you never work with raw arrays.

### 🗄️ Selective Caching

[](#️-selective-caching)

Saloon cache plugin for read-only requests (info, version, image inspect/history) with configurable TTLs. Keep things fast without stale data.

### 🔗 Flexible Connections

[](#-flexible-connections)

Connect via Unix socket (default), TCP, or TLS with full certificate support. Configurable timeouts and custom headers out of the box.

### 🐝 Docker Swarm Ready

[](#-docker-swarm-ready)

Initialize, join, and leave clusters. Manage services, nodes, tasks, secrets, and configs from the UI or programmatically through the API.

### ✅ Thoroughly Tested

[](#-thoroughly-tested)

Lawman architectural expectations for the Saloon connector and requests. Pest-powered feature and unit tests with full mock support — no daemon required.

---

Quick start
-----------

[](#quick-start)

**1. Install**

```
composer require eloquage/docker-php
```

**2. Publish config**

```
php artisan vendor:publish --tag=docker-php.config
```

**3. Configure** (default: Unix socket)

```
DOCKER_CONNECTION=unix
DOCKER_UNIX_SOCKET=/var/run/docker.sock
DOCKER_API_VERSION=v1.53
```

**4. Open the UI** at `/docker` (or your configured prefix).

---

Programmatic usage
------------------

[](#programmatic-usage)

```
use Eloquage\DockerPhp\Facades\DockerPhp;

// List containers
$response = DockerPhp::containers()->list(all: true);
$containers = $response->json();

// List images (returns DTOs)
$response = DockerPhp::images()->list();
$images = $response->dto(); // ImageSummary[]

// System info
$response = DockerPhp::system()->info();
$info = $response->dto(); // SystemInfo
$hostname = $info->name();
```

Errors are thrown as `Eloquage\DockerPhp\Exceptions\DockerApiException` with the daemon’s message.

---

Configuration overview
----------------------

[](#configuration-overview)

Env / configDefaultDescription`DOCKER_CONNECTION``unix``unix`, `tcp`, or `tls``DOCKER_UNIX_SOCKET``/var/run/docker.sock`Socket path (unix)`DOCKER_HOST``localhost`Host (tcp/tls)`DOCKER_PORT``2375`Port (tcp/tls)`DOCKER_API_VERSION``v1.53`Engine API version`DOCKER_PHP_UI_PREFIX``docker`URL prefix for the UI`DOCKER_PHP_CACHE_ENABLED``true`Cache for read-only requestsSee `config/docker-php.php` and the [documentation](https://eloquage.github.io/docker-php) for the full reference.

---

UI preview
----------

[](#ui-preview)

The UI includes a sidebar with **Dashboard**, **Containers**, **Images**, **Volumes**, **Networks**, and (when Swarm is initialized) **Swarm**, **Services**, **Nodes**, **Tasks**, **Secrets**, and **Configs**. The dashboard loads system info, version, and disk usage in parallel. Images support pull with progress bar (SSE), Docker Hub search, tag, inspect with history, and prune with feedback.

---

Testing
-------

[](#testing)

```
vendor/bin/pest --compact
```

Tests use Saloon’s MockClient; no Docker daemon is required. See [Testing](docs/advanced/testing.md) in the docs.

Livewire components use the same `DockerPhp` service and resources to drive the UI.

---

Documentation
-------------

[](#documentation)

Full documentation (getting started, configuration, API reference, UI guide, caching, streaming, testing) is published at:

****

---

Changelog
---------

[](#changelog)

See [changelog.md](changelog.md) for what has changed recently.

Contributing
------------

[](#contributing)

See [contributing.md](contributing.md) for details.

Security
--------

[](#security)

If you discover any security-related issues, please email the maintainers instead of using the issue tracker.

License
-------

[](#license)

MIT. See the [license file](license.md) for more information.

---

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance81

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b311acd903629b160e9fc48e3d1a40e8a0006091e4eb9157b257b804ed19cfe4?d=identicon)[zagambila](/maintainers/zagambila)

---

Top Contributors

[![miguelenes](https://avatars.githubusercontent.com/u/1568086?v=4)](https://github.com/miguelenes "miguelenes (13 commits)")

---

Tags

api-clientdockerdocker-apidocker-enginedocker-phpdocker-swarmlaravelmanagement-uilaravelsaloondockerfluxlivewireapi clientcontainersdocker-apidocker-swarmdocker-engine

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/eloquage-docker-php/health.svg)

```
[![Health](https://phpackages.com/badges/eloquage-docker-php/health.svg)](https://phpackages.com/packages/eloquage-docker-php)
```

###  Alternatives

[livewire/flux

The official UI component library for Livewire.

9475.0M86](/packages/livewire-flux)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)[ympact/flux-icons

A package to provide icons from different vendors for Livewire Flux.

116.2k](/packages/ympact-flux-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
