承接 lowel/docker-api-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

lowel/docker-api-php-sdk

最新稳定版本:2.1.0

Composer 安装命令:

composer require lowel/docker-api-php-sdk

包简介

Docker Engine API PHP SDK

README 文档

README

Installation

Current library was tested on docker 1.51 api version!

composer require lowel/docker-api-php-sdk

Supported clients

SDK support:

  • Manual PSR-7 client;
  • Manual response handler, that return DTO objects (looks Lowel\Docker\Response\DTO) instead of ResponseInterface and throw some of the custom exceptions from Lowel\Docker\Exceptions;
  • Async client, based on Guzzle library, return promises;
  • Async response handler, same as manual response handler, but return type is promises.

You can init all clients use Lowel\Docker\ClientFactory:

$clientFactory = new \Lowel\Docker\ClientFactory();

$client = $clientFactory->getClient();
$clientWithHandler = $clientFactory->getClientWithHandler();
$asyncClient = $clientFactory->getAsyncClient();
$asyncClientWithHandler = $clientFactory->getAsyncClientWithHandler();

$client->containerList();
$clientWithHandler->containerInspect('container-name');
$asyncClient->containerStart('container-name');
$asyncClientWithHandler->containerStop('container-name');

$asyncClient->wait();
$asyncClientWithHandler->wait();

Configuration

You can switch default docker api version by set DOCKER_API_VERSION global env:

// Client factory use default value '1.41v'
$_ENV['DOCKER_API_VERSION'] = '1.43v'

Also you should have /var/run/docker.sock in your system. This is default path for docker socker.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固