diff --git a/5.6/alpine/Dockerfile b/5.6/alpine/Dockerfile index 587539804..354885a98 100644 --- a/5.6/alpine/Dockerfile +++ b/5.6/alpine/Dockerfile @@ -136,11 +136,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/5.6/fpm/alpine/Dockerfile b/5.6/fpm/alpine/Dockerfile index 82cae9672..165f0e4b7 100644 --- a/5.6/fpm/alpine/Dockerfile +++ b/5.6/fpm/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/5.6/zts/alpine/Dockerfile b/5.6/zts/alpine/Dockerfile index f8e610aaa..53185de9b 100644 --- a/5.6/zts/alpine/Dockerfile +++ b/5.6/zts/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.0/alpine/Dockerfile b/7.0/alpine/Dockerfile index 38db98713..0ef38367f 100644 --- a/7.0/alpine/Dockerfile +++ b/7.0/alpine/Dockerfile @@ -136,11 +136,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.0/fpm/alpine/Dockerfile b/7.0/fpm/alpine/Dockerfile index 69841f6ae..91bb1549f 100644 --- a/7.0/fpm/alpine/Dockerfile +++ b/7.0/fpm/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.0/zts/alpine/Dockerfile b/7.0/zts/alpine/Dockerfile index 2e79fe41f..8cbe1bf21 100644 --- a/7.0/zts/alpine/Dockerfile +++ b/7.0/zts/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.1/alpine/Dockerfile b/7.1/alpine/Dockerfile index 98af53687..7a264e8bb 100644 --- a/7.1/alpine/Dockerfile +++ b/7.1/alpine/Dockerfile @@ -136,11 +136,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.1/fpm/alpine/Dockerfile b/7.1/fpm/alpine/Dockerfile index 3cad0c4ba..23226e2f7 100644 --- a/7.1/fpm/alpine/Dockerfile +++ b/7.1/fpm/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.1/zts/alpine/Dockerfile b/7.1/zts/alpine/Dockerfile index 8acb858e4..e774a5299 100644 --- a/7.1/zts/alpine/Dockerfile +++ b/7.1/zts/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.2-rc/alpine/Dockerfile b/7.2-rc/alpine/Dockerfile index 5d4950cec..8d2f40615 100644 --- a/7.2-rc/alpine/Dockerfile +++ b/7.2-rc/alpine/Dockerfile @@ -136,11 +136,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.2-rc/fpm/alpine/Dockerfile b/7.2-rc/fpm/alpine/Dockerfile index 6b5eea359..4adb07006 100644 --- a/7.2-rc/fpm/alpine/Dockerfile +++ b/7.2-rc/fpm/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/7.2-rc/zts/alpine/Dockerfile b/7.2-rc/zts/alpine/Dockerfile index 7b410f0af..f58ac92b2 100644 --- a/7.2-rc/zts/alpine/Dockerfile +++ b/7.2-rc/zts/alpine/Dockerfile @@ -137,11 +137,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index e2e3eccc7..9b1a38c94 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -130,11 +130,10 @@ RUN set -xe \ && docker-php-source delete \ \ && runDeps="$( \ - scanelf --needed --nobanner --recursive /usr/local \ - | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ - | sort -u \ - | xargs -r apk info --installed \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )" \ && apk add --no-cache --virtual .php-rundeps $runDeps \ \