title: Docker Call to undefined function imagecreatefromjpeg()
body: <p>I try to install GD, because I'm getting the error "Call to undefined function imagecreatefromjpeg()".</p>
  
  <p>When building the image I'm getting the error</p>
  
  <pre><code>E: Unable to locate package libfreetype6-dev
  E: Unable to locate package libjpeg62-turbo-dev
  E: Unable to locate package libpng12-dev
  The command '/bin/sh -c apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev &amp;&amp; docker-php-ext-configure gd --enable-gd-native-ttf --with-freetype-dir=/usr/include/freetype2 --with-png-dir=/usr/include --with-jpeg-dir=/usr/include &amp;&amp; docker-php-ext-install gd &amp;&amp; docker-php-ext-enable gd' returned a non-zero code: 100
  </code></pre>
  
  <p>My Dockerfile</p>
  
  <pre><code>FROM php:7-fpm
  
  # Install GD
  RUN apt-get install -y \
  libfreetype6-dev \
  libjpeg62-turbo-dev \
  libpng12-dev \
  &amp;&amp; docker-php-ext-configure gd \
  --enable-gd-native-ttf \
  --with-freetype-dir=/usr/include/freetype2 \
  --with-png-dir=/usr/include \
  --with-jpeg-dir=/usr/include \
  &amp;&amp; docker-php-ext-install gd \
  &amp;&amp; docker-php-ext-enable gd
  </code></pre>
  
  <p>What's the right way to install GD?</p>