tortitas/docker-sdk
最新稳定版本:0.1.1
Composer 安装命令:
composer require tortitas/docker-sdk
包简介
PHP SDK for Docker API
README 文档
README
Install
Via Composer
composer require tortitas/docker-sdk
Usage
use Tortitas\DockerSDK\DockerSDK; use Tortitas\DockerSDK\Container; $image = 'nginx:latest'; DockerSDK::pull($image); $container = new Container( 'my-nginx-php-container', $image ); $container->create()->start(); DockerSDK::list();
Notes
If on Windows, you need to have Docker desktop installed and running. Also you need to have the Docker daemon running on TCP port 2375. You can do this by going to the Docker desktop settings and enabling the option "Expose daemon on tcp://localhost:2375 without TLS".
The SDK uses the Docker API v1.41. You can check the API version by running
docker versionon your terminal.
Testing
composer test
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-11