/**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->stdOut->writeln('<info>Building containers</info>');
     $composeConfig = new ComposeConfig();
     // Create docker folder in project.
     try {
         $composeConfig->ensureDirectories();
     } catch (IOException $e) {
         $this->stdOut->writeln("<error>Error while trying to create docker-compose directories.</error>");
         exit(1);
     }
     $composeConfig->copyImages();
     $composeConfig->copyConfigs();
     $composeContainers = new ComposeContainers($this->projectName);
     // @todo check if services.yml has redis
     $composeContainers->addRedis();
     $composeConfig->writeDockerCompose($composeContainers);
     // @todo: see if this is a drupal project
     $drupalSettings = new Drupal\Settings();
     $drupalSettings->save();
     $this->executeDockerCompose('build');
     $this->executeDockerCompose('up', ['-d']);
 }
 public function writeDockerCompose(ComposeContainers $composeContainers)
 {
     $this->fs->dumpFile($this->projectPath . '/docker-compose.yml', $composeContainers->yaml());
 }