How to install pdo driver in php docker image?

前端 未结 1 1450
太阳男子
太阳男子 2020-11-28 11:47

I am using as a base the php docker container with the tag:

php:5.6-apache

I linked it with a ba

相关标签:
1条回答
  • 2020-11-28 12:23

    The official repository of PHP has a script called docker-php-ext-install https://github.com/docker-library/php/tree/master/5.6

    You forgot to install the extension needed to run the PDO.

    Try do create a docker image like this:

    FROM php:5.6-apache
    
    # PHP extensions
    
    RUN docker-php-ext-install pdo pdo_mysql pdo_pgsql
    
    0 讨论(0)
提交回复
热议问题