tortitas/docker-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 version on your terminal.

Testing

composer test

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-11