protected function startProxy() { $this->stdOut->writeln("<comment>Starting the nginx proxy container"); if (!Docker::start([$this->containerName])->isSuccessful()) { // Container wasn't created yet. return $this->createProxy(); } return 1; }
protected function startProxy() { $this->stdOut->writeln("<comment>Starting the nginx proxy container"); try { // Throws an exception if not successful. Docker::start([$this->containerName]); } catch (\Exception $e) { return $this->createProxy(); } return 1; }
protected function startSeleniumContainer() { $this->stdOut->writeln("<comment>Starting the Selenium container"); try { return !Docker::start([$this->containerName])->isSuccessful(); } catch (\Exception $e) { $this->stdOut->writeln("<comment>Creating the Selenium container"); return Docker::run(['-d', '-p', '4444:4444', '-v', '/dev/shm:/dev/shm', '--name', $this->containerName, 'selenium/standalone-firefox:2.47.1']); } }