diff --git a/runtimes/8.3/Dockerfile b/runtimes/8.3/Dockerfile index 7f0acdd7..f2d9b149 100644 --- a/runtimes/8.3/Dockerfile +++ b/runtimes/8.3/Dockerfile @@ -4,6 +4,7 @@ LABEL maintainer="Taylor Otwell" ARG WWWGROUP ARG NODE_VERSION=20 +ARG MYSQL_CLIENT="mysql-client" ARG POSTGRES_VERSION=15 WORKDIR /var/www/html @@ -44,7 +45,7 @@ RUN apt-get update \ && echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ && apt-get update \ && apt-get install -y yarn \ - && apt-get install -y mysql-client \ + && apt-get install -y $MYSQL_CLIENT \ && apt-get install -y postgresql-client-$POSTGRES_VERSION \ && apt-get -y autoremove \ && apt-get clean \ diff --git a/src/Console/Concerns/InteractsWithDockerComposeServices.php b/src/Console/Concerns/InteractsWithDockerComposeServices.php index 258738c6..a89056b9 100644 --- a/src/Console/Concerns/InteractsWithDockerComposeServices.php +++ b/src/Console/Concerns/InteractsWithDockerComposeServices.php @@ -65,6 +65,11 @@ protected function buildDockerCompose(array $services) ? Yaml::parseFile($composePath) : Yaml::parse(file_get_contents(__DIR__ . '/../../../stubs/docker-compose.stub')); + // Prepare the installation of the "mariadb-client" package if the MariaDB service is used... + if (in_array('mariadb', $services)) { + $compose['services']['laravel.test']['build']['args']['MYSQL_CLIENT'] = 'mariadb-client'; + } + // Adds the new services as dependencies of the laravel.test service... if (! array_key_exists('laravel.test', $compose['services'])) { $this->warn('Couldn\'t find the laravel.test service. Make sure you add ['.implode(',', $services).'] to the depends_on config.');