PHPackages                             soyhuce/laravel-docker - 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. [API Development](/categories/api)
4. /
5. soyhuce/laravel-docker

ActiveLibrary[API Development](/categories/api)

soyhuce/laravel-docker
======================

Interact with a Docker instance

2.2.1(2mo ago)212.5k↓34.8%1[2 issues](https://github.com/Soyhuce/laravel-docker/issues)[1 PRs](https://github.com/Soyhuce/laravel-docker/pulls)MITPHPPHP ^8.3CI passing

Since May 13Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/Soyhuce/laravel-docker)[ Packagist](https://packagist.org/packages/soyhuce/laravel-docker)[ RSS](/packages/soyhuce-laravel-docker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (29)Used By (0)

Docker
======

[](#docker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cb28c4b5a3a205fa12f9378554caa518694f8503fcfdb4b0f62da96f7a13f9c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f79687563652f6c61726176656c2d646f636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soyhuce/laravel-docker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f5bf870154f2f37c84071e42e4c0da727ac36656b3493a45c20d3724fef37ef4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f79687563652f6c61726176656c2d646f636b65722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/soyhuce/laravel-docker/actions/workflows/run-tests.yml)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/19b65047a829c3aaa788d72aea20faf4c15b4c0f153421f75d1e8f9789e5c694/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f79687563652f6c61726176656c2d646f636b65722f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/soyhuce/laravel-docker/actions/workflows/phpstan.yml)[![GitHub PHPStan Action Status](https://camo.githubusercontent.com/bf80c60b31dc2397ed810d3ae3bd8adad0e4cb0c894eed0f440f71ed41af123e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f79687563652f6c61726176656c2d646f636b65722f7068702d63732d66697865722e796d6c3f6272616e63683d6d61696e266c6162656c3d7068702d63732d6669786572267374796c653d666c61742d737175617265)](https://github.com/soyhuce/laravel-docker/actions/workflows/php-cs-fixer.yml)[![Total Downloads](https://camo.githubusercontent.com/6b77cc02188d77ef4fcdd81fe9a0ae1fee4d88ef455f10cf048ad5959b93436b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f79687563652f6c61726176656c2d646f636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soyhuce/laravel-docker)

This package allows you to communicate with a Docker instance via unix socket or API.

API mode is based on [API Docker Engine](https://docs.docker.com/engine/api/v1.40)

Installation
------------

[](#installation)

You can install the package via composer:

`composer require soyhuce/laravel-docker`

Utilisation
-----------

[](#utilisation)

#### Configuration

[](#configuration)

Publish configuration file via:

`php artisan vendor:publish --provider="Soyhuce\Docker\ServiceProvider"`

#### API

[](#api)

To use this package with API drive, you can expose Docker on HTTP port.

For example, you can do this:

`socat TCP-LISTEN:,reuseaddr,fork UNIX-CLIENT:`

So, in your configuration file, you have to define your configuration file like this:

```
[
    'driver' => 'api',
    'version' => 'v1.40',
    'drivers' => [
        'api' => [
            'url' => 'http://127.0.0.1:',
        ]
    ],
]

```

You can also use the unix socket to connect to Docker :

```
[
    'driver' => 'api',
    'version' => 'v1.40',
    'drivers' => [
        'socket' => [
            'unix_socket' => '/var/run/docker.sock',
        ],
    ],
]

```

#### Working with Docker containers

[](#working-with-docker-containers)

- create($imageName, $containerName) : Create a container from an image
- start($containerId) : Start a container from its name or id
- stop($containerId) : Stop a container from its name or id
- wait($containerId) : Wait a container from its name or id
- delete($containerId) : Delete a container from its name or id

#### Working with Docker images

[](#working-with-docker-images)

- create($imageName, $tagName) : Pull an image
- all() : Retrieve all images on your Docker instance
- remove($imageName) : Remove an image from its name

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance67

Regular maintenance activity

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 57% 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 ~85 days

Recently: every ~109 days

Total

26

Last Release

62d ago

Major Versions

1.13.0 → 2.0.02025-01-02

PHP version history (6 changes)1.3.0PHP ^7.4

1.5.0PHP ^7.4|^8.0

1.6.0PHP ^8.0

1.7.0PHP ^8.1

1.10.0PHP ^8.2

2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/206cfbf866a463f7e7d1e86946d59b82f4191b9c89f9981fb03eeb264d77af79?d=identicon)[SoyHuCe](/maintainers/SoyHuCe)

---

Top Contributors

[![ElRochito](https://avatars.githubusercontent.com/u/1737307?v=4)](https://github.com/ElRochito "ElRochito (49 commits)")[![bastien-phi](https://avatars.githubusercontent.com/u/10199039?v=4)](https://github.com/bastien-phi "bastien-phi (26 commits)")[![qanvo](https://avatars.githubusercontent.com/u/15672030?v=4)](https://github.com/qanvo "qanvo (5 commits)")[![EdenMl](https://avatars.githubusercontent.com/u/70885551?v=4)](https://github.com/EdenMl "EdenMl (4 commits)")[![GamerClassN7](https://avatars.githubusercontent.com/u/22167469?v=4)](https://github.com/GamerClassN7 "GamerClassN7 (1 commits)")[![tnajah59](https://avatars.githubusercontent.com/u/91531929?v=4)](https://github.com/tnajah59 "tnajah59 (1 commits)")

---

Tags

apidockerhacktoberfestlaravelsocketapilaravelSocketdocker

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/soyhuce-laravel-docker/health.svg)

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

###  Alternatives

[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[gufy/whmcs

WHMCS API for Laravel 5

201.7k](/packages/gufy-whmcs)

PHPackages © 2026

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