Пример #1
0
 /**
  * @param Image  $image
  * @param string $name
  *
  * @return string
  */
 public function getAssetPath(Image $image, $name)
 {
     return vsprintf('%s/images/%s/%s', [$this->getProjectDirectory($image->getProjectName(true)), $image->getName(), $name]);
 }
Пример #2
0
 public function runInteractive(Image $image, $command = '')
 {
     if (false === in_array(22, $image->getPorts())) {
         throw new \InvalidArgumentException(sprintf('Image %s does not have port 22 open', $image->getName()));
     }
     $command = $this->getSshCommand($command, $image);
     $this->executor->executeCommand($command, new TTY());
 }