예제 #1
0
 /**
  * Create a build
  *
  * @param Job $build Build used to create image
  *
  * @return Image|boolean Return the image created if sucessful or false otherwise
  */
 public function create(Job $build)
 {
     $context = new Context($this->buildPath . DIRECTORY_SEPARATOR . $build->getDirectory());
     $this->docker->build($context, $build->getName(), $this->logger->getBuildCallback(), $this->quietBuild, $this->usecache, true);
     $this->logger->clearStatic();
     try {
         return $this->docker->getImageManager()->find($build->getRepository(), $build->getTag());
     } catch (ImageNotFoundException $e) {
         return false;
     }
 }