getDataDirectory() . '/php-fpm/Dockerfile', $config); } /** * @throws \Exception */ public function build(InputInterface $input): PHPDockerFileBuilder { $this->setInitialContent(); $this->content = str_replace('${PHP_VERSION}', (string) $this->config->getPhpVersion($input), $this->content); file_put_contents( $this->config->getDataDirectory() . '/php-fpm/opcache.ini', $this->config->getConfigFileContents('php-fpm/opcache.ini') ); if ($this->config->isDatabaseEnabled($input)) { if (in_array($this->config->getDatabaseDriver($input), ['sqlite3', 'sqlite'])) { $this->addNewLine(); $this->content .= $this->config->getConfigFileContents('php-fpm/Sqlite.Dockerfile'); } } $this->content = str_replace('${NODE_VERSION}', (string) $this->config->getNodeVersion($input), $this->content); if ($this->config->isXdebugEnabled($input)) { $this->addNewLine(); $this->content .= $this->config->getConfigFileContents('php-fpm/Xdebug.Dockerfile'); file_put_contents( $this->config->getDataDirectory() . '/php-fpm/xdebug.ini', $this->config->getConfigFileContents('php-fpm/xdebug.ini') ); } return $this; } private function setInitialContent(): void { $this->content = $this->config->getConfigFileContents('php-fpm/Dockerfile'); } }