Docker Community Forums

Share and learn in the Docker community.

How to install docker-php-ext-install mssql

I have a legacy query that uses @mssql_connect .

$this->_linkIdentifier = @mssql_connect($this->_host, $this->_username, $this->_password);
var_dump($this->_linkIdentifier);die();

I created a docker container for php:5.4.42-fpm. i now need to install the php_mssql extension so that i may use the above query.

 FROM php:5.4.42-fpm
 
  # Install the PHP pdo_mysql extention
   RUN docker-php-ext-install pdo_mysql \
       docker-php-ext-install mssql

This returns an error;

`ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c docker-php-ext-install pdo_mysql       && docker-php-ext-install mssql   && docker-php-ext-install pdo_pgsql   && docker-php-ext-configure gd     --with-jpeg-dir=/usr/lib     --with-freetype-dir=/usr/include/freetype2 &&     docker-php-ext-install gd' returned a non-zero code: 1`

Question: how do i install mssql extention to my php container.