Answer the question
In order to leave comments, you need to log in
How to install php7 pdo_pgsql via Dockerfile?
Dockerfile
FROM php:7-fpm
ENV PATH $PATH:/root/.composer/vendor/bin
# Install modules
RUN apt-get update && apt-get install -y \
openssl \
curl \
wget \
git \
unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libicu-dev \
--no-install-recommends
RUN docker-php-ext-install mcrypt
RUN docker-php-ext-install intl
RUN docker-php-ext-install mbstring
RUN docker-php-ext-install exif
RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_pgsql
....
....
checking for PostgreSQL support for PDO... yes, shared
checking for pg_config... not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
ERROR: Service 'php' failed to build: The command '/bin/sh -c docker-php-ext-install pdo_pgsql' returned a non-zero code: 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question