If you don't want give the same answer for every single prompt ("yes", "no", or ""), you can use --configureoptions
to set specific values for each option (see the PECL manual).
You'll want to find your package's package.xml file to see what options are configurable. As an example, for the memcached
package, you'd go here:
https://github.com/php-memcached-dev/php-memcached/blob/master/package.xml
Search for the <configureoption>
tags, which in this case are:
<configureoption name="with-libmemcached-dir" prompt="libmemcached directory" default="no"/>
<configureoption name="with-zlib-dir" prompt="zlib directory" default="no"/>
<configureoption name="with-system-fastlz" prompt="use system fastlz" default="no"/>
<configureoption name="enable-memcached-igbinary" prompt="enable igbinary serializer" default="no"/>
<configureoption name="enable-memcached-msgpack" prompt="enable msgpack serializer" default="no"/>
<configureoption name="enable-memcached-json" prompt="enable json serializer" default="no"/>
<configureoption name="enable-memcached-protocol" prompt="enable server protocol" default="no"/>
<configureoption name="enable-memcached-sasl" prompt="enable sasl" default="yes"/>
<configureoption name="enable-memcached-session" prompt="enable sessions" default="yes"/>
You can then pass these options along to the install command like so:
pecl install --configureoptions 'with-libmemcached-dir="no" with-zlib-dir="no" with-system-fastlz="no" enable-memcached-igbinary="yes" enable-memcached-msgpack="no" enable-memcached-json="no" enable-memcached-protocol="no" enable-memcached-sasl="yes" enable-memcached-session="yes"' memcached
RUN pecl install apc
, at build time, you'll get the default values automatically selected. – Kennethkennett