Skip to content

Commit

Permalink
Merge pull request docker-library#420 from infosiftr/nm
Browse files Browse the repository at this point in the history
Install "binutils" in "docker-php-ext-enable" if needed
  • Loading branch information
yosifkit authored May 4, 2017
2 parents fdc6876 + 4cfa24e commit 8efce53
Show file tree
Hide file tree
Showing 22 changed files with 462 additions and 0 deletions.
21 changes: 21 additions & 0 deletions 5.6/alpine/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 5.6/apache/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 5.6/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 5.6/fpm/alpine/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 5.6/fpm/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 5.6/zts/alpine/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 5.6/zts/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 7.0/alpine/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 7.0/apache/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 7.0/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 7.0/fpm/alpine/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
21 changes: 21 additions & 0 deletions 7.0/fpm/docker-php-ext-enable
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ if [ -z "$modules" ]; then
exit 1
fi

pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi

apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi

for module in $modules; do
if nm -g "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
Expand All @@ -81,3 +98,7 @@ for module in $modules; do
echo "$line" >> "$ini"
fi
done

if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
Loading

0 comments on commit 8efce53

Please sign in to comment.