Skip to content

Commit 24381e5

Browse files
author
Julien Neuhart
committed
fixing issue: now removing php.ini files in the correct step for fpm and apache variants
1 parent 0717e58 commit 24381e5

File tree

4 files changed

+10
-32
lines changed

4 files changed

+10
-32
lines changed

Dockerfile.slim.apache

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ ENV TEMPLATE_PHP_INI=development
7272
# Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
7373
RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
7474

75-
76-
# Let's remove the default Apache php.ini file (it will be copied from TEMPLATE_PHP_INI)
77-
RUN rm /etc/php/${PHP_VERSION}/apache2/php.ini
78-
79-
80-
81-
82-
8375
# |--------------------------------------------------------------------------
8476
# | Composer
8577
# |--------------------------------------------------------------------------
@@ -209,6 +201,8 @@ ENV APACHE_DOCUMENT_ROOT=
209201
RUN sed -ri -e 's!/var/www/html!${ABSOLUTE_APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
210202
RUN sed -ri -e 's!/var/www/!${ABSOLUTE_APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
211203

204+
# Let's remove the default Apache php.ini file (it will be copied from TEMPLATE_PHP_INI)
205+
RUN rm /etc/php/${PHP_VERSION}/apache2/php.ini
212206

213207
# |--------------------------------------------------------------------------
214208
# | Apache mod_rewrite

Dockerfile.slim.cli

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ ENV TEMPLATE_PHP_INI=development
7272
# Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
7373
RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
7474

75-
76-
77-
78-
79-
8075
# |--------------------------------------------------------------------------
8176
# | Composer
8277
# |--------------------------------------------------------------------------

Dockerfile.slim.fpm

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ ENV TEMPLATE_PHP_INI=development
7272
# Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
7373
RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
7474

75-
76-
77-
78-
# Let's remove the default PHP-FPM php.ini file (it will be copied from TEMPLATE_PHP_INI)
79-
RUN rm /etc/php/${PHP_VERSION}/fpm/php.ini
80-
81-
82-
8375
# |--------------------------------------------------------------------------
8476
# | Composer
8577
# |--------------------------------------------------------------------------
@@ -154,6 +146,9 @@ RUN apt-get update \
154146
&& apt-get clean \
155147
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
156148

149+
# Let's remove the default PHP-FPM php.ini file (it will be copied from TEMPLATE_PHP_INI)
150+
RUN rm /etc/php/${PHP_VERSION}/fpm/php.ini
151+
157152

158153

159154

utils/Dockerfile.slim.blueprint

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,6 @@ ENV TEMPLATE_PHP_INI=development
7474
# Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
7575
RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
7676

77-
{{if eq $variant "apache" }}
78-
# Let's remove the default Apache php.ini file (it will be copied from TEMPLATE_PHP_INI)
79-
RUN rm /etc/php/${PHP_VERSION}/apache2/php.ini
80-
{{end}}
81-
82-
{{if eq $variant "fpm" }}
83-
# Let's remove the default PHP-FPM php.ini file (it will be copied from TEMPLATE_PHP_INI)
84-
RUN rm /etc/php/${PHP_VERSION}/fpm/php.ini
85-
{{end}}
86-
87-
8877
# |--------------------------------------------------------------------------
8978
# | Composer
9079
# |--------------------------------------------------------------------------
@@ -214,6 +203,8 @@ ENV APACHE_DOCUMENT_ROOT=
214203
RUN sed -ri -e 's!/var/www/html!${ABSOLUTE_APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
215204
RUN sed -ri -e 's!/var/www/!${ABSOLUTE_APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
216205

206+
# Let's remove the default Apache php.ini file (it will be copied from TEMPLATE_PHP_INI)
207+
RUN rm /etc/php/${PHP_VERSION}/apache2/php.ini
217208

218209
# |--------------------------------------------------------------------------
219210
# | Apache mod_rewrite
@@ -230,6 +221,9 @@ RUN apt-get update \
230221
&& apt-get install -y --no-install-recommends php${PHP_VERSION}-fpm \
231222
&& apt-get clean \
232223
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
224+
225+
# Let's remove the default PHP-FPM php.ini file (it will be copied from TEMPLATE_PHP_INI)
226+
RUN rm /etc/php/${PHP_VERSION}/fpm/php.ini
233227
{{end}}
234228

235229

0 commit comments

Comments
 (0)