Skip to content

Commit

Permalink
Use all cores for compilation, strip extensions libs from debug symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Dec 20, 2023
1 parent 871030c commit 0d02e53
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions 8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ RUN set -xe; \
apk add --update --no-cache -t .wodby-php-build-deps \
autoconf \
automake \
binutils \
cmake \
brotli-dev \
build-base \
Expand Down Expand Up @@ -161,7 +162,8 @@ RUN set -xe; \
docker-php-source extract; \
cp /usr/src/php/php.ini-production "${PHP_INI_DIR}/php.ini"; \
\
docker-php-ext-install \
NPROC=$(getconf _NPROCESSORS_ONLN); \
docker-php-ext-install "-j${NPROC}" \
bcmath \
bz2 \
calendar \
Expand All @@ -187,7 +189,6 @@ RUN set -xe; \
--with-freetype \
--with-avif \
--with-jpeg; \
NPROC=$(getconf _NPROCESSORS_ONLN); \
docker-php-ext-install "-j${NPROC}" gd; \
\
# IMAP
Expand All @@ -212,7 +213,7 @@ RUN set -xe; \
ln -sfnv /opt/mssql-tools*/bin/* /usr/bin; \
rm ./*.apk; \
\
pecl install \
MAKEFLAGS="-j ${NPROC}" pecl install \
apcu-5.1.23 \
amqp-2.1.1 \
ast-1.1.1 \
Expand Down Expand Up @@ -286,7 +287,7 @@ RUN set -xe; \
brotli_url="https://github.com/kjdev/php-ext-brotli/archive/refs/tags/${brotli_ext_ver}.tar.gz"; \
wget -qO- "${brotli_url}" | tar xz --strip-components=1 -C /usr/src/php/ext/brotli; \
docker-php-ext-configure brotli --with-libbrotli; \
docker-php-ext-install brotli; \
docker-php-ext-install "-j${NPROC}" brotli; \
\
wget -qO- https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer; \
\
Expand Down Expand Up @@ -360,6 +361,7 @@ RUN set -xe; \
docker-php-source delete; \
apk del --purge .wodby-php-build-deps; \
pecl clear-cache; \
strip --strip-debug /usr/local/lib/php/extensions/no-debug-non-zts-*/*.so; \
\
rm -rf \
/usr/src/php/ext/ast \
Expand Down

0 comments on commit 0d02e53

Please sign in to comment.