andreipetcu/docker-php
Composer 安装命令:
composer require andreipetcu/docker-php
包简介
README 文档
README
Docker PHP is a small wrapper for easy usage of docker/docker-compose written in PHP.
Installation
composer require andreipetcu/docker-php
Usage
<?php use AndreiPetcu\DockerPhp\Docker; use AndreiPetcu\DockerPhp\DockerCompose; use Symfony\Component\Process\ProcessBuilder; $compose = new DockerCompose(new ProcessBuilder()); $compose->setPath('/path/to/project') ->setNamespace('awesome'); $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 $compose->start('nginx') ->docker($docker) ->ssh('nginx'); // Will ssh into the given container. $docker->ssh('container');
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-09