Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
@jonataa

This comment has been minimized.

Copy link

jonataa commented Aug 4, 2016

These snippet was very helpful :)

Thank you!

@vargaslucas

This comment has been minimized.

Copy link

vargaslucas commented Dec 16, 2016

Thanks man.

@qmachard

This comment has been minimized.

Copy link

qmachard commented Jan 6, 2017

Thanks 👍

@dargmuesli

This comment has been minimized.

Copy link

dargmuesli commented Jul 2, 2017

Very helpful! :)

@otherpirate

This comment has been minimized.

Copy link

otherpirate commented Feb 9, 2018

Thanks!

@IanSmith123

This comment has been minimized.

Copy link

IanSmith123 commented Mar 14, 2018

awesome, just now my script failed because of php5-pgsql was removed? Anyway I delete it and worked :)

@GithubMrxia

This comment has been minimized.

Copy link

GithubMrxia commented Mar 19, 2018

Thanks!

@hperrin

This comment has been minimized.

Copy link

hperrin commented Apr 10, 2018

Thank you! 😀

@erikverheij

This comment has been minimized.

Copy link

erikverheij commented Apr 11, 2018

thx :)

@obadaro

This comment has been minimized.

Copy link

obadaro commented Apr 18, 2018

Thanks for sharing.
In my case it was necessary to add the pgsql extension:
docker-php-ext-install pgsql pdo pdo_pgsql

@SiM07

This comment has been minimized.

Copy link

SiM07 commented Apr 23, 2018

👍

@ricardson

This comment has been minimized.

Copy link

ricardson commented Jun 8, 2018

FROM php:7.2.6-apache

RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
@mhsenpc

This comment has been minimized.

Copy link

mhsenpc commented Sep 12, 2018

perfectly worked on php:7.1-apache.
thanks

@murtuzamvista

This comment has been minimized.

Copy link

murtuzamvista commented Nov 5, 2018

Thanks 👍

@miqueiaspenha

This comment has been minimized.

Copy link

miqueiaspenha commented Nov 23, 2018

@arturmangabeira

This comment has been minimized.

Copy link

arturmangabeira commented Feb 12, 2019

thanks, works very well..

@1000VICKY

This comment has been minimized.

Copy link

1000VICKY commented Mar 22, 2019

Thank you.
Completing how to install which you wrote, I succeeded to install pdo_pgsql.

@tt4rm1nal

This comment has been minimized.

Copy link

tt4rm1nal commented Mar 26, 2019

Thanks a lot!

@jcelda

This comment has been minimized.

Copy link

jcelda commented Sep 12, 2019

Thanks for the snipped. You are great!!!

@MathewBurnett

This comment has been minimized.

Copy link

MathewBurnett commented Sep 12, 2019

Brilliant, this has changed everything about the way we work.

@Lepidopterist

This comment has been minimized.

Copy link

Lepidopterist commented Sep 12, 2019

I've spent the last nine years searching for this solution. It's the best three lines of config I have ever seen. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.