v1.1.1 2017-11-01 14:00 UTC

This package is not auto-updated.

Last update: 2020-01-10 16:20:44 UTC


Docker PHP is a small wrapper for easy usage of docker/docker-compose written in PHP.

Latest Version Build Status Software License


composer require andreipetcu/docker-php



use AndreiPetcu\DockerPhp\Docker;
use AndreiPetcu\DockerPhp\DockerCompose;
use Symfony\Component\Process\ProcessBuilder;

$compose = new DockerCompose(new ProcessBuilder());

$docker = new Docker(new ProcessBuilder());

// All commands accept either a service as a string or an array of services
// and a verbose flag which defaults to false
$compose->build('nginx', true)
    ->start('nginx', true)
    ->restart('nginx', true)
    ->stop('nginx', true)
    ->destroy('nginx', true);

// Will ssh into awesome_nginx_1

// Will ssh into the given container.


The MIT License (MIT). Please see License File for more information.