Skip to content

Commit a8e4e74

Browse files
authored
Install "mariadb-client" package for MariaDB users (#693)
1 parent c4fcfa4 commit a8e4e74

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

runtimes/8.3/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ LABEL maintainer="Taylor Otwell"
44

55
ARG WWWGROUP
66
ARG NODE_VERSION=20
7+
ARG MYSQL_CLIENT="mysql-client"
78
ARG POSTGRES_VERSION=15
89

910
WORKDIR /var/www/html
@@ -44,7 +45,7 @@ RUN apt-get update \
4445
&& 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 \
4546
&& apt-get update \
4647
&& apt-get install -y yarn \
47-
&& apt-get install -y mysql-client \
48+
&& apt-get install -y $MYSQL_CLIENT \
4849
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
4950
&& apt-get -y autoremove \
5051
&& apt-get clean \

src/Console/Concerns/InteractsWithDockerComposeServices.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ protected function buildDockerCompose(array $services)
6565
? Yaml::parseFile($composePath)
6666
: Yaml::parse(file_get_contents(__DIR__ . '/../../../stubs/docker-compose.stub'));
6767

68+
// Prepare the installation of the "mariadb-client" package if the MariaDB service is used...
69+
if (in_array('mariadb', $services)) {
70+
$compose['services']['laravel.test']['build']['args']['MYSQL_CLIENT'] = 'mariadb-client';
71+
}
72+
6873
// Adds the new services as dependencies of the laravel.test service...
6974
if (! array_key_exists('laravel.test', $compose['services'])) {
7075
$this->warn('Couldn\'t find the laravel.test service. Make sure you add ['.implode(',', $services).'] to the depends_on config.');

0 commit comments

Comments
 (0)