承接 eloquage/docker-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

eloquage/docker-php

最新稳定版本:1.1.0

Composer 安装命令:

composer require 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.

README 文档

README

PHP 8.4 Laravel 12 Tests License Packagist Downloads

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

🔌 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

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

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

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

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

🔗 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

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

✅ 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

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

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

Env / config Default Description
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 requests

See config/docker-php.php and the documentation for the full reference.

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

vendor/bin/pest --compact

Tests use Saloon’s MockClient; no Docker daemon is required. See Testing in the docs.

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

Documentation

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

https://eloquage.github.io/docker-php

Changelog

See changelog.md for what has changed recently.

Contributing

See contributing.md for details.

Security

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

License

MIT. See the license file for more information.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固