Skip to content

Instantly share code, notes, and snippets.

@ben-albon
Last active April 21, 2024 17:10
Show Gist options
  • Star 72 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
  • Save ben-albon/3c33628662dcd4120bf4 to your computer and use it in GitHub Desktop.
Save ben-albon/3c33628662dcd4120bf4 to your computer and use it in GitHub Desktop.
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
@silasstoffel
Copy link

Works also on PHP 8.1, thanks

@sidneyn
Copy link

sidneyn commented Oct 18, 2023

very much!!

@G3NSVRV
Copy link

G3NSVRV commented Apr 21, 2024

php:8-apache

3.563 E: Unable to locate package docker-php-ext-install
3.563 E: Unable to locate package pgsql
3.563 E: Unable to locate package pdo
3.563 E: Unable to locate package pdo_pgsql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment