title: How to enable pdo_mysql in the php docker image
body: <p>I have a basic <code>Dockerfile</code> with the following in:</p>
  
  <pre><code>FROM php:7.1-apache
  RUN apt-get update &amp;&amp; docker-php-ext-install pdo_mysql
  COPY . /var/www
  EXPOSE 80
  </code></pre>
  
  <p>I have a docker-compose.yml file</p>
  
  <pre><code>version: "3"
  services:
    app:
      build: .
      ports:
        - "80:80"
      volumes:
        - .:/var/www
      depends_on:
        - mysql
    mysql:
      image: mysql:8
      ports:
        - "3306:3306"
      environment:
        MYSQL_DATABASE: "app"
        MYSQL_USER: "app"
        MYSQL_PASSWORD: "app"
        MYSQL_ROOT_PASSWORD: "test"
  </code></pre>
  
  <p>I then ran <code>docker build -t app . &amp;&amp; docker-compose up</code> at the root of the project. Everything seems to build correctly, but when outputting <code>phpinfo</code> I don't see the mysql_pdo extension.</p>
  
  <p><a href="https://i.stack.imgur.com/PyaQI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PyaQI.png" alt="enter image description here"></a></p>
  
  <p>Are there any steps I am missing?</p>