Weave Code
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

Client Laravel Package

docker-client/client

Lightweight PHP client for the Docker Engine API. Create, start, delete, inspect, list, and stream logs for containers; manage images (create/delete/inspect). Early-stage package with minimal supported actions; see examples for usage.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Client
What Laravel versions does this package support, and are there any PHP version requirements?
The package supports PHP 7.2–8.0, which aligns with Laravel 6–8.x. Laravel 9+ (PHP 8.1+) may require manual adjustments for newer PHP features like named arguments or strict typing. No Laravel-specific dependencies exist, so integration is possible but requires manual service container binding.
How do I integrate this Docker client into a Laravel application?
Register the client in a Laravel service provider using `app->singleton()` to bind the Docker client to the container. Publish a config file for Docker host settings (e.g., Unix socket or TCP port) and timeouts. No built-in facade or Laravel utilities are provided, so you’ll need to create a custom manager class or facade for convenience.
Does this package support Docker Engine API v4+ or modern Docker features like Swarm or Kubernetes?
The package targets an older Docker Engine API version (likely v3 or earlier) and lacks support for Swarm, Kubernetes, or advanced networking. Compatibility with newer Docker versions (v4+) is untested, and the last release was in 2020. You may need to fork or extend it for modern environments.
Are there alternatives to this package that are actively maintained?
Yes, consider the official `docker/docker-sdk-php` (feature-complete, async support) or `reactphp/docker` (event-driven, non-blocking). This package is abandoned with no tests or CI, making alternatives like these safer for production. Use this only if you need a lightweight, minimal solution and can handle maintenance risks.
Can I use this package to stream container logs in real-time (e.g., for monitoring)?
No, this package does not support real-time log streaming (e.g., `attach` or WebSocket-based events). It only provides static `logs()` or `log()` methods for fetching past logs. For live monitoring, use `reactphp/docker` or implement a custom polling solution with the Docker Engine API.
How do I handle Docker API errors or exceptions in Laravel?
The package lacks documented error handling, so you’ll need to wrap Docker API calls in try-catch blocks and translate exceptions into Laravel’s exception format (e.g., `DockerException`). Consider extending the client or creating a custom exception handler for consistency with Laravel’s debugging tools like Monolog.
Does this package work with Docker Desktop, cloud providers (e.g., ECS, AKS), or remote Docker hosts?
The package assumes direct access to the Docker Engine API (e.g., Unix socket or TCP port) and does not include built-in support for Docker Desktop-specific configurations or cloud providers. You’ll need to manually configure the connection string (e.g., `tcp://host:port`) to match your environment.
Are there plans to add missing features like `exec`, `commit`, or network/volume management?
No, the package is abandoned with no active development. Missing features (e.g., `exec`, `commit`, or networking) will require custom wrappers or a fork. The README explicitly states it’s early-stage with limited scope, so prioritize alternatives like `docker/docker-sdk-php` for comprehensive Docker management.
How can I test this package in a Laravel application before production use?
Spin up a test environment with a Docker container and validate basic operations (e.g., `Container::create()`, `Image::inspect()`). Compare outputs with the `docker` CLI or the official SDK to ensure consistency. Since there are no tests or CI, manual integration testing is critical—mock the Docker client in unit tests and validate edge cases like timeouts or permission errors.
What’s the backup plan if this package stops working due to Docker API changes or PHP version drops?
Fork the repository and maintain it internally, as the original package is abandoned. Monitor Docker Engine API deprecations and update the client accordingly. For long-term stability, consider migrating to `docker/docker-sdk-php` or `reactphp/docker`, which are actively maintained and support modern PHP and Docker features.
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.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
testo/facade
headercat/phpstan-extension-ide-helper
yosymfony/parser-utils
innmind/black-box
babenkoivan/elastic-migrations
babenkoivan/elastic-adapter
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle