mlocati / docker-php-extension-installer

Easily install PHP extensions in Docker containers
MIT License
4.33k stars 388 forks source link

Can't install pdo_sqlsrv for php:8.2-fpm-alpine3.20 #998

Closed b1ek closed 3 weeks ago

b1ek commented 3 weeks ago

Version of install-php-extensions

it is on latest

Error description

### INSTALLING REMOTE MODULE pdo_sqlsrv ###
Installing the Microsoft SQL Server ODBC Driver
curl: (6) Could not resolve host: download.microsoft.com
The command '/bin/sh -c install-php-extensions pdo_sqlsrv' returned a non-zero code: 6

Docker image

php:8.2-fpm-alpine3.20

Minimal Dockerfile

FROM php:8.2-fpm-alpine3.20

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/install-php-extensions
COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN install-php-extensions gd imagick openssl pdo_sqlsrv bcmath ctype curl dom fileinfo json mbstring pdo tokenizer xml xmlwriter session imagick
mlocati commented 3 weeks ago

Could not resolve host: download.microsoft.com

Please check that your container doesn't have network issues.

b1ek commented 3 weeks ago

nope. curl https://download.microsoft.com connects without issues

mlocati commented 3 weeks ago

The script users curl to download a file from the download.microsoft.com website:

https://github.com/mlocati/docker-php-extension-installer/blob/master/install-php-extensions#L2144