Can a Dockerfile extend another one?
<p>I have a Dockerfile for PHP like this :</p>

<pre><code>FROM php:7-fpm
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update &amp;&amp; \
    apt-get install -y git libicu-dev libmagickwand-dev libmcrypt-dev libcurl3-dev jpegoptim
RUN pecl install imagick &amp;&amp; \
    docker-php-ext-enable imagick

RUN docker-php-ext-install intl
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install opcache
RUN docker-php-ext-install mcrypt
RUN docker-php-ext-install curl
RUN docker-php-ext-install zip
</code></pre>

<p>And I'd like to create another Dockerfile, based on the first one, but with some PHP extensions added (for dev purpose) : Xdebug and other stuffs.</p>

<p>Can I create a "dev" Dockerfile that extends my main Dockerfile (without rewrite it) ?</p>