Skip to content

Commit 5858e89

Browse files
committed
Optimize layers by externalizing only large extensions
1 parent 87eefb3 commit 5858e89

File tree

7 files changed

+15
-17
lines changed

7 files changed

+15
-17
lines changed

php-82/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,18 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -Os -I${INSTALL_DIR}/include -I
150150
--enable-exif \
151151
--enable-ftp \
152152
--with-gettext \
153-
--enable-mbstring \
153+
--enable-mbstring=shared \
154154
--with-pdo-mysql=mysqlnd \
155155
--with-mysqli \
156156
--enable-pcntl \
157157
--with-zip \
158158
--enable-bcmath \
159-
--with-pdo-pgsql=shared \
159+
--with-pdo-pgsql \
160160
# Separate .so extension so that it is not loaded by default
161161
--enable-intl=shared \
162162
# Separate .so extension so that it is not loaded by default
163163
--enable-soap=shared \
164-
# Separate .so extension so that it is not loaded by default
165-
--with-xsl=${INSTALL_DIR} \
164+
--with-xsl \
166165
--with-ffi \
167166
# necessary for `pecl` to work (to install PHP extensions)
168167
--with-pear \

php-83/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,18 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -Os -I${INSTALL_DIR}/include -I
150150
--enable-exif \
151151
--enable-ftp \
152152
--with-gettext \
153-
--enable-mbstring \
153+
--enable-mbstring=shared \
154154
--with-pdo-mysql=mysqlnd \
155155
--with-mysqli \
156156
--enable-pcntl \
157157
--with-zip \
158158
--enable-bcmath \
159-
--with-pdo-pgsql=shared \
159+
--with-pdo-pgsql \
160160
# Separate .so extension so that it is not loaded by default
161161
--enable-intl=shared \
162162
# Separate .so extension so that it is not loaded by default
163163
--enable-soap=shared \
164-
# Separate .so extension so that it is not loaded by default
165-
--with-xsl=${INSTALL_DIR} \
164+
--with-xsl \
166165
--with-ffi \
167166
# necessary for `pecl` to work (to install PHP extensions)
168167
--with-pear \

php-84/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,18 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -Os -I${INSTALL_DIR}/include -I
149149
--enable-exif \
150150
--enable-ftp \
151151
--with-gettext \
152-
--enable-mbstring \
152+
--enable-mbstring=shared \
153153
--with-pdo-mysql=mysqlnd \
154154
--with-mysqli \
155155
--enable-pcntl \
156156
--with-zip \
157157
--enable-bcmath \
158-
--with-pdo-pgsql=shared \
158+
--with-pdo-pgsql \
159159
# Separate .so extension so that it is not loaded by default
160160
--enable-intl=shared \
161161
# Separate .so extension so that it is not loaded by default
162162
--enable-soap=shared \
163-
# Separate .so extension so that it is not loaded by default
164-
--with-xsl=${INSTALL_DIR} \
163+
--with-xsl \
165164
--with-ffi \
166165
# necessary for `pecl` to work (to install PHP extensions)
167166
--with-pear \

php-85/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,18 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -Os -I${INSTALL_DIR}/include -I
149149
--enable-exif \
150150
--enable-ftp \
151151
--with-gettext \
152-
--enable-mbstring \
152+
--enable-mbstring=shared \
153153
--with-pdo-mysql=mysqlnd \
154154
--with-mysqli \
155155
--enable-pcntl \
156156
--with-zip \
157157
--enable-bcmath \
158-
--with-pdo-pgsql=shared \
158+
--with-pdo-pgsql \
159159
# Separate .so extension so that it is not loaded by default
160160
--enable-intl=shared \
161161
# Separate .so extension so that it is not loaded by default
162162
--enable-soap=shared \
163-
# Separate .so extension so that it is not loaded by default
164-
--with-xsl=${INSTALL_DIR} \
163+
--with-xsl \
165164
--with-ffi \
166165
# necessary for `pecl` to work (to install PHP extensions)
167166
--with-pear \

src/php-85.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ post_max_size=6M
5151
upload_max_filesize=6M
5252

5353
extension_dir=/opt/bref/extensions
54+
; Extensions enabled by default
55+
extension=mbstring

src/php.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ upload_max_filesize=6M
5252

5353
extension_dir=/opt/bref/extensions
5454
; Extensions enabled by default
55+
extension=mbstring
5556
zend_extension=opcache.so

tests/test_3_manual_extensions.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
extension=intl
22
extension=apcu
3-
extension=pdo_pgsql
43
extension=soap

0 commit comments

Comments
 (0)