docker install and enable php extension
<p>I trying to use Docker for my Symfony3 project I got it running but I get this error: </p>

<pre><code>The LDAP PHP extension is not enabled.
</code></pre>

<p>It does sound right as I am using Ldap extension for my project. I have tried installing the Ldap extension using Dockerfile for my php image which seems to install it but still gives me this error.</p>

<p>Q1) How do I install required php extensions to my php image.
Q2) Once extension installed how do i enable it.</p>

<p><strong>docker-compose.yml:</strong></p>

<pre><code>web:
    image: nginx:latest
    ports:
        - "80:80"
    volumes:
        - ./site.conf:/etc/nginx/conf.d/site.conf
 project files
    volumes_from:
        - php
    links:
        - php

php:
    image: php:5.6-fpm
    volumes:
        - ./project_code:/var/www/project
</code></pre>

<p><strong>Dockerfile:</strong></p>

<pre><code>FROM php:5.6-fpm

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install php5-ldap -y
</code></pre>