title: dockerfile not updating container
body: <p>I'm working with an app using docker (i'm not super familiar) and I need to add 2 new PHP extensions. I have changed the <code>Dockerfile</code> on an existing image as follows:</p>
  
  <pre><code>FROM php:7.2-fpm
  
  RUN apt-get update
  
  RUN apt-get install -y git unzip
  
  RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
  
  RUN apt-get install -y git libpng-dev \
      &amp;&amp; docker-php-ext-install gd
  
  RUN apt-get install -y mysql-client \
      &amp;&amp; docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
      &amp;&amp; docker-php-ext-install pdo_mysql
  
  RUN apt-get install -y libgmp-dev bcmath \
      &amp;&amp; docker-php-ext-configure gmp \
      &amp;&amp; docker-php-ext-install gmp \
      &amp;&amp; docker-php-ext-install bcmath
  
  RUN pecl install xdebug \
      &amp;&amp; docker-php-ext-enable xdebug
  
  ADD docker/templates/usr/local/etc/php/conf.d/uploads.ini /usr/local/etc/php/conf.d/uploads.ini
  </code></pre>
  
  <p>My new lines are:</p>
  
  <pre><code>RUN apt-get install -y libgmp-dev bcmath \
  &amp;&amp; docker-php-ext-configure gmp \
  &amp;&amp; docker-php-ext-install gmp \
  &amp;&amp; docker-php-ext-install bcmath
  </code></pre>
  
  <p>I tried <code>docker-compose restart</code>, I tried <code>docker-compose down</code> followed by <code>docker-compose up</code>, I removed the container entirely and re-created with <code>up</code>. However hard I try, I always get this error when doing a <code>composer require</code> </p>
  
  <blockquote>
    <p>the requested PHP extension bcmath is missing from your system.</p>
  </blockquote>
  
  <p>I'm not sure why this is happening. Why won't the extension install, and how come if I completely delete the contents and write garbled text in the <code>Dockerfile</code>, it always runs successfully. Is it caching it?</p>
  
  <p><strong>Can somebody explain how I'd re-provision with the new changes I made?</strong></p>
  
  <p>Snippet of <code>docker-compose.yml</code>:</p>
  
  <pre><code>services:
    web:
      build:
        context: ./
        dockerfile: docker/web.docker
      working_dir: /var/www
      volumes:
        - ./:/var/www
      ports:
        - 81:80
    app:
      build:
        context: ./
        dockerfile: docker/app.docker
      working_dir: /var/www
      volumes:
        - ./:/var/www
      environment:
        - "LARAVEL_ENVIRONMENT=local"
  </code></pre>