PHP code example of dockercloud / api
1. Go to this page and download the library: Download dockercloud/api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dockercloud / api example snippets
DockerCloud\Client::configure('username','apikey');
$API = new DockerCloud\API\Service();
$Response = $API->getList();
$MetaData = $Response->getMeta();
$services = $Response->getObjects();
$Model = new DockerCloud\Model\Service();
$Model->setImageName('tutum/hello-world');
$API = new DockerCloud\API\Service();
$Model = $API->create($Model);