diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 25400de7ab..3083680d18 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -19,12 +19,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps diff --git a/Dockerfile-cli.template b/Dockerfile-cli.template index bb0392b31e..d3e8ea3fd9 100644 --- a/Dockerfile-cli.template +++ b/Dockerfile-cli.template @@ -12,12 +12,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps diff --git a/php5.6/cli/Dockerfile b/php5.6/cli/Dockerfile index 867fdaf206..99c1eb6152 100644 --- a/php5.6/cli/Dockerfile +++ b/php5.6/cli/Dockerfile @@ -12,12 +12,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps diff --git a/php5.6/fpm-alpine/Dockerfile b/php5.6/fpm-alpine/Dockerfile index c1fd08f209..3def1e644d 100644 --- a/php5.6/fpm-alpine/Dockerfile +++ b/php5.6/fpm-alpine/Dockerfile @@ -19,12 +19,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps diff --git a/php7.0/cli/Dockerfile b/php7.0/cli/Dockerfile index 7893007b10..b90aa7bf1b 100644 --- a/php7.0/cli/Dockerfile +++ b/php7.0/cli/Dockerfile @@ -12,12 +12,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps diff --git a/php7.0/fpm-alpine/Dockerfile b/php7.0/fpm-alpine/Dockerfile index 24e6ed30fc..4db8c808d2 100644 --- a/php7.0/fpm-alpine/Dockerfile +++ b/php7.0/fpm-alpine/Dockerfile @@ -19,12 +19,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps diff --git a/php7.1/cli/Dockerfile b/php7.1/cli/Dockerfile index 5347a2aeae..92a073f33d 100644 --- a/php7.1/cli/Dockerfile +++ b/php7.1/cli/Dockerfile @@ -12,12 +12,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps diff --git a/php7.1/fpm-alpine/Dockerfile b/php7.1/fpm-alpine/Dockerfile index e07b26554b..48dc9b21e9 100644 --- a/php7.1/fpm-alpine/Dockerfile +++ b/php7.1/fpm-alpine/Dockerfile @@ -19,12 +19,10 @@ RUN set -ex; \ docker-php-ext-install gd mysqli opcache; \ \ runDeps="$( \ - scanelf --needed --nobanner --recursive \ - /usr/local/lib/php/extensions \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --virtual .wordpress-phpexts-rundeps $runDeps; \ apk del .build-deps