title: Docker Image installing php modules
body: <p>I created a Dockerfile like below</p>
  
  <pre><code>FROM ubuntu:14.04
  
  RUN apt-get update -y &amp;&amp; apt-get install -y software-properties-common language-pack-en-base
  
  RUN LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
  
  RUN apt-get -y update &amp;&amp; apt-get install -y \
      php7.0 \
      php7.0-pgsql \
      php-pear \
      php7.0-curl \
      php7.0-sqlite3 \
      php7.0-xml \
      php7.0-bcmath \
      php7.0-zip \
      php7.0-mbstring \
      php-xdebug \
      php-ast
  
  WORKDIR /var/www/html/code
  </code></pre>
  
  <p>When i run <code>docker-compose build container_name</code></p>
  
  <p>And <code>docker-compose run --rm container_name php -m</code></p>
  
  <p>It seems like not all the php modules were installed during the build of the container. As the result shows below. </p>
  
  <pre><code>[PHP Modules]
      ast
      calendar
      Core
      ctype
      date
      exif
      fileinfo
      filter
      ftp
      gettext
      hash
      iconv
      json
      libxml
      openssl
      pcntl
      pcre
      PDO
      Phar
      posix
      readline
      Reflection
      session
      shmop
      sockets
      SPL
      standard
      sysvmsg
      sysvsem
      sysvshm
      tokenizer
      xdebug
      Zend OPcache
      zlib
  
      [Zend Modules]
      Xdebug
      Zend OPcache
  </code></pre>
  
  <p>I did not get the php modules that i exepected to see like <code>pdo_pgsql</code>, <code>xml</code>, <code>xmlreader</code> and etc.</p>