Пример #1
0
 public function kill()
 {
     if ($this->exists()) {
         writeln("<comment>Kill elasticsearch container {$this->container}</comment>");
         $command = Env::evalDocker() . "docker rm -f {$this->container}";
         runLocally($command);
     }
 }
Пример #2
0
 public function exists()
 {
     $command = Env::evalDocker() . "docker inspect {$this->container}";
     try {
         $output = runLocally($command);
         return true;
     } catch (\Exception $ex) {
         return false;
     }
 }
Пример #3
0
 public static function doLocal($command, $timeout = 999)
 {
     writeln('===================================================');
     writeln('Running command:');
     writeln($command);
     writeln('===================================================');
     return runLocally(Env::evalDocker() . $command, $timeout);
 }