Beispiel #1
0
 /**
  * @return Session
  */
 private function getSession()
 {
     if (null == $this->session) {
         $this->session = new Session(new Configuration($this->machine->getIp()), new Password(self::DEFAULT_USERNAME, self::DEFAULT_PASSWORD));
     }
     return $this->session;
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function run()
 {
     $this->userInteraction->writeTitle('Configure routing for direct Docker containers access');
     $machineIp = $this->machine->getIp();
     $this->configureRouting($machineIp);
     $this->addPermanentRouting($machineIp);
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if ($this->machine->isRunning()) {
         $this->machine->stop();
     }
     $this->machine->start();
 }
 /**
  * {@inheritdoc}
  */
 public function run()
 {
     try {
         $this->machine->start();
     } catch (MachineException $e) {
         // Ignore the problem as if the machine is not running, we
         // will run the installer.
     }
     if (!$this->machine->isRunning()) {
         $this->dockerInstaller->run();
     }
 }
Beispiel #5
0
 private function restartMachine()
 {
     if ($this->machine->isRunning()) {
         $this->machine->stop();
     }
     $this->machine->start();
 }
Beispiel #6
0
 /**
  * {@inheritdoc}
  */
 public function run()
 {
     if (!$this->machine->isCreated()) {
         $this->machine->create();
     }
 }