/** * @param \Peanut\Console\Application $app * @param array $config */ public function exec(\Peanut\Console\Application $app, array $config) { $name = $app->getArgument('container name'); $command = $app->getArgument('*'); $this->initMachine(); $this->dockerSsh($name, $command); }
/** * @param \Peanut\Console\Application $app * @param array $config */ public function exec(\Peanut\Console\Application $app, array $config) { $this->initMachine(); $taskName = $app->getArgument('task name'); $action = $app->getArgument('*'); if (true === isset($config['tasks'])) { if (true === in_array($taskName, array_keys($config['tasks']))) { $this->dockerTask($config['tasks'][$taskName], $action); } else { throw new \Peanut\Console\Exception($taskName . ' not defined'); } } }
/** * @param \Peanut\Console\Application $app * @param array $config */ public function exec(\Peanut\Console\Application $app, array $config) { $name = $app->getArgument('container name'); $force = $app->getOption('force'); $this->initMachine(); $this->dockerRm($name, $force); }
/** * @param \Peanut\Console\Application $app * @param array $config */ public function exec(\Peanut\Console\Application $app, array $config) { $isFollow = $app->getOption('follow'); $name = $app->getArgument('container name'); $this->initMachine(); $this->dockerLog($name, $isFollow); }
/** * @param \Peanut\Console\Application $app * @param array $config */ public function exec(\Peanut\Console\Application $app, array $config) { $name = $app->getArgument('container name'); $this->initMachine(); $this->dockerInspect($name); }