Iron.io Workers PHP error Class 'PDO' not found

116 Views Asked by At

I've got this error when launching a php worker on Iron.io :

PHP Fatal error:  Class 'PDO' not found in /mnt/task/...

My PHP script just call the native PDO extension like this :

$db = new PDO (...);

Anybody know if there's a known problem with the docker image iron/php and the PDO extension ?

Thank you.

1

There are 1 best solutions below

2
On BEST ANSWER

Try to add php-pdo package into your docker image.

Example of installing php-pdo package via Dockerfile: FROM iron/php ... RUN apk add php-pdo ...