title: Why docker-php-ext-install does not contains some extensions, and has it advantages over pecl?
body: <p>Lets consider these commands:</p>
  <p>We starting docker image with php 7.2 based on alpine.</p>
  <pre><code>docker run -it php:7.2-fpm-alpine3.7 sh
  </code></pre>
  <p>We trying to install php-mongodb as any other extension</p>
  <pre><code>docker-php-ext-install mongodb
  </code></pre>
  <p>But we obtaining error:</p>
  <pre><code>error: /usr/src/php/ext/mongodb does not exist
  
  usage: /usr/local/bin/docker-php-ext-install [-jN] ext-name [ext-name 
  ...]
     ie: /usr/local/bin/docker-php-ext-install gd mysqli
         /usr/local/bin/docker-php-ext-install pdo pdo_mysql
         /usr/local/bin/docker-php-ext-install -j5 gd mbstring mysqli pdo pdo_mysql shmop
  
  if custom ./configure arguments are necessary, see docker-php-ext-configure
  
  Possible values for ext-name:
  bcmath bz2 calendar ctype curl dba dom enchant exif fileinfo filter ftp gd gettext gmp hash iconv imap interbase intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline recode reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zend_test zip
  
  Some of the above modules are already compiled into PHP; please check
  the output of &quot;php -i&quot; to see which modules are already loaded.
  </code></pre>
  <p>I found some images of php with installed mongodb drivers:</p>
  <blockquote>
  <p><a href="https://github.com/Vinelab/docker-php-mongo" rel="noreferrer">https://github.com/Vinelab/docker-php-mongo</a></p>
  <p><a href="https://gist.github.com/ebuildy/ba6820cbe1befaa229d2" rel="noreferrer">https://gist.github.com/ebuildy/ba6820cbe1befaa229d2</a></p>
  <p><a href="https://hub.docker.com/r/spittet/php-mongodb/" rel="noreferrer">https://hub.docker.com/r/spittet/php-mongodb/</a></p>
  </blockquote>
  <p>All with the same command:</p>
  <pre><code>pecl install mongodb
  </code></pre>
  <p>Have <code>docker-php-ext-install</code> any advantages over <code>pecl</code>? I saw that most extensions is installed by <code>docker-php-ext-install</code>. I found this question without answer in issue:</p>
  <blockquote>
  <p><a href="https://github.com/docker-library/php/issues/374" rel="noreferrer">https://github.com/docker-library/php/issues/374</a></p>
  </blockquote>
  <p>If pecl contains all extensions, but <code>docker-php-ext-install</code> allow to install constrained list, why it was created?</p>