File tree Expand file tree Collapse file tree 5 files changed +44
-13
lines changed Expand file tree Collapse file tree 5 files changed +44
-13
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,15 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
69
69
70
70
ENV TEMPLATE_PHP_INI=development
71
71
72
- # Let's remove the default php.ini files (they will be copied from TEMPLATE_PHP_INI)
73
- RUN rm /etc/php/${PHP_VERSION}/cli/php.ini &&\
74
- rm /etc/php/${PHP_VERSION}/apache2/php.ini
72
+ # Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
73
+ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
74
+
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
+
75
81
76
82
77
83
# |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -69,9 +69,12 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
69
69
70
70
ENV TEMPLATE_PHP_INI=development
71
71
72
- # Let's remove the default php.ini files (they will be copied from TEMPLATE_PHP_INI)
73
- RUN rm /etc/php/${PHP_VERSION}/cli/php.ini &&\
74
- rm /etc/php/${PHP_VERSION}/apache2/php.ini
72
+ # Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
73
+ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
74
+
75
+
76
+
77
+
75
78
76
79
77
80
# |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -69,9 +69,15 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
69
69
70
70
ENV TEMPLATE_PHP_INI=development
71
71
72
- # Let's remove the default php.ini files (they will be copied from TEMPLATE_PHP_INI)
73
- RUN rm /etc/php/${PHP_VERSION}/cli/php.ini &&\
74
- rm /etc/php/${PHP_VERSION}/apache2/php.ini
72
+ # Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
73
+ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
74
+
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
+
75
81
76
82
77
83
# |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -71,9 +71,18 @@ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
71
71
72
72
ENV TEMPLATE_PHP_INI=development
73
73
74
- # Let's remove the default php.ini files (they will be copied from TEMPLATE_PHP_INI)
75
- RUN rm /etc/php/${PHP_VERSION}/cli/php.ini &&\
76
- rm /etc/php/${PHP_VERSION}/apache2/php.ini
74
+ # Let's remove the default CLI php.ini file (it will be copied from TEMPLATE_PHP_INI)
75
+ RUN rm /etc/php/${PHP_VERSION}/cli/php.ini
76
+
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}}
77
86
78
87
79
88
# |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -7,11 +7,18 @@ touch /opt/container_started
7
7
8
8
# Let's apply the requested php.ini file
9
9
10
- # TODO: APACHE AND PHP-FPM
11
10
if [ ! -f /etc/php/${PHP_VERSION} /cli/php.ini ] || [ -L /etc/php/${PHP_VERSION} /cli/php.ini ]; then
12
11
ln -sf /usr/lib/php/${PHP_VERSION} /php.ini-${TEMPLATE_PHP_INI} /etc/php/${PHP_VERSION} /cli/php.ini
13
12
fi
14
13
14
+ if [[ " $IMAGE_VARIANT " == " apache" ]]; then
15
+ ln -sf /usr/lib/php/${PHP_VERSION} /php.ini-${TEMPLATE_PHP_INI} /etc/php/${PHP_VERSION} /apache2/php.ini
16
+ fi
17
+
18
+ if [[ " $IMAGE_VARIANT " == " fpm" ]]; then
19
+ ln -sf /usr/lib/php/${PHP_VERSION} /php.ini-${TEMPLATE_PHP_INI} /etc/php/${PHP_VERSION} /fpm/php.ini
20
+ fi
21
+
15
22
# Let's find the user to use for commands.
16
23
# If $DOCKER_USER, let's use this. Otherwise, let's find it.
17
24
if [[ " $DOCKER_USER " == " " ]]; then
You can’t perform that action at this time.
0 commit comments