Check out example codes for "configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path". It will help you in understanding the concepts better.

Code Example 1

FROM php:5.6-fpm

RUN apt-get update

# Install Postgre PDO
RUN apt-get install -y libpq-dev \
    && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
    && docker-php-ext-install pdo pdo_pgsql pgsql

Learn ReactJs, React Native from akashmittal.com