2017 © Pedro Peláez
 

library docker-api

Docker Api

image

wumvi/docker-api

Docker Api

  • Sunday, February 18, 2018
  • by wumvi
  • Repository
  • 0 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Dev

Docker

run --rm -d -v /var/run/docker.sock:/var/run/docker.sock -p 40:22 wumvi/www.dev
include './vendor/autoload.php';

$exec = new \DockerApi\Exec();

$execArguments = new \DockerApi\Arguments\Exec\Prepare('img', 'ping ya.ru -c 1');
$id = $exec->prepare($execArguments);
$exec->start($id);
$response = $exec->inspect($id);

Для текста

curl -X POST -H "Content-Type: application/json" --unix-socket /var/run/docker.sock http://localhost/containers/359b3a116ae3e/exec -d '{ "AttachStdin":false,"AttachStdout":true,"AttachStderr":true, "Tty":false, "Cmd":["/bin/bash", "-c", "ps ax"]'}
curl -X POST -H "Content-Type: application/json" --unix-socket /var/run/docker.sock http://localhost/exec/aac679c66a0890ea80a209d9dd3db556f0670da5770497fb8eb40526f5e0009f/start -d '{"Detach": false,"Tty": false}'
curl -X GET --unix-socket /var/run/docker.sock http://localhost/exec/aac679c66a0890ea80a209d9dd3db556f0670da5770497fb8eb40526f5e0009f/json 

The Versions

18/02 2018

dev-master

9999999-dev

Docker Api

  Sources   Download

The Requires

 

18/02 2018

v1.0.10

1.0.10.0

Docker Api

  Sources   Download

The Requires

 

18/02 2018

v1.0.9

1.0.9.0

Docker Api

  Sources   Download

The Requires

 

18/02 2018

v1.0.8

1.0.8.0

Docker Api

  Sources   Download

The Requires

 

02/11 2017

1.0.5

1.0.5.0

Docker Api

  Sources   Download

The Requires