File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ RUN apk update \
1616 && adduser -u 1000 -D -G app app --home /opt/app \
1717 && touch /.you-are-in-a-wyrihaximus.net-php-docker-image
1818
19+ COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
20+
1921FROM base AS base-build
2022RUN apk add --no-cache $PHPIZE_DEPS git libuv-dev
2123
@@ -44,18 +46,14 @@ COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/
4446RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
4547 mv /*.so "$EXTENSION_DIR/" && \
4648 apk add --no-cache \
47- gmp-dev \
48- zlib-dev \
49- postgresql-dev \
50- libzip-dev \
5149 libuv-dev \
5250 coreutils \
5351 procps \
5452 git \
5553 $PHPIZE_DEPS \
5654 ## Install PECL
5755 && wget -q pear.php.net/go-pear.phar && php go-pear.phar \
58- && docker -php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache \
56+ && install -php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache \
5957 && if [ $(php -v | grep "PHP 8.0" | wc -l) != 0 ] ; then true ; else pecl install eio; fi \
6058 && if [ $(php -v | grep "PHP 8.0" | wc -l) != 0 ] ; then true ; else docker-php-ext-enable eio; fi \
6159 && docker-php-ext-enable uv \
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ RUN apt-get update \
1616 && adduser --uid 1000 --gid 1000 --disabled-password app --home /opt/app \
1717 && touch /.you-are-in-a-wyrihaximus.net-php-docker-image
1818
19+ COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
20+
1921FROM base AS base-build
2022RUN yes | apt-get install $PHPIZE_DEPS git libuv1-dev
2123
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ RUN apk update \
1616 && adduser -u 1000 -D -G app app --home /opt/app \
1717 && touch /.you-are-in-a-wyrihaximus.net-php-docker-image
1818
19+ COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
20+
1921FROM base AS base-build
2022RUN apk add --no-cache $PHPIZE_DEPS git libuv-dev
2123
@@ -44,10 +46,6 @@ COPY src/php/cli/conf/*.ini /usr/local/etc/php/conf.d/
4446RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
4547 mv /*.so "$EXTENSION_DIR/" && \
4648 apk add --no-cache \
47- gmp-dev \
48- zlib-dev \
49- postgresql-dev \
50- libzip-dev \
5149 libuv-dev \
5250 make \
5351 git \
@@ -59,7 +57,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
5957 $PHPIZE_DEPS \
6058 ## Install PECL
6159 && wget -q pear.php.net/go-pear.phar && php go-pear.phar \
62- && docker -php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache \
60+ && install -php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache \
6361 && pecl install parallel || (cd /tmp && apk add --no-cache $PHPIZE_DEPS git && git clone https://github.com/krakjoe/parallel && cd parallel && git fetch && git pull && phpize && ./configure && make install && cd) \
6462 && docker-php-ext-enable parallel \
6563 && if [ $(php -v | grep "PHP 8.0" | wc -l) != 0 ] ; then true ; else pecl install eio; fi \
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ RUN apt-get update \
1616 && adduser --uid 1000 --gid 1000 --disabled-password app --home /opt/app \
1717 && touch /.you-are-in-a-wyrihaximus.net-php-docker-image
1818
19+ COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
20+
1921FROM base AS base-build
2022RUN yes | apt-get install $PHPIZE_DEPS git libuv1-dev
2123
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ apk update
66apk add --no-cache freetype-dev libjpeg-turbo-dev libpng-dev vips-dev $PHPIZE_DEPS
77# # Initially this was an if statement to check for PHP 7.4, but since then the situation change so we're just going to try both to avoid the conditional growing out of hand
88(docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ || docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/)
9- docker-php-ext-install -j$( nproc) gd
10- pecl install vips
11- docker-php-ext-enable vips
9+ install-php-extensions gd vips
1210rm -rf /var/cache/apk/*
1311rm -rf /tmp/*
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ apt-get update
66yes | apt-get install libfreetype6-dev libjpeg62-turbo-dev libpng-dev libvips-dev $PHPIZE_DEPS
77# # Initially this was an if statement to check for PHP 7.4, but since then the situation change so we're just going to try both to avoid the conditional growing out of hand
88(docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ || docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/)
9- docker-php-ext-install -j$( nproc) gd
10- pecl install vips
11- docker-php-ext-enable vips
9+ install-php-extensions gd vips
1210rm -rf /var/cache/apt/*
1311rm -rf /tmp/*
You can’t perform that action at this time.
0 commit comments