-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL SERVER client support failed for debian 11 based OS image (PHP-FPM) #3149
Labels
Comments
justinchen19791203
changed the title
SQL SERVER client support failed for debian 11 based OS image
SQL SERVER client support failed for debian 11 based OS image (PHP-FPM)
Feb 14, 2022
possible duplicate of #3042 |
@justinchen19791203 would you try to build now? Seems to be autofixed by recent Microsoft release https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15 |
This was referenced Sep 22, 2022
This was referenced Sep 26, 2022
This was referenced Oct 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
E: Unable to locate package msodbcsql17
Expected Behavior:
The package should be installed successfully
Context information:
Output of
git rev-parse HEAD
Output of
docker version
Output of
docker-compose version
System info: Mac, Windows or Linux. Include which disto/version
Steps to reproduce the issue:
FROM laradock/php-fpm:latest-8.1
ARG INSTALL_MSSQL=true
RUN set -eux;
if [ ${INSTALL_MSSQL} = true ]; then
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then
apt-get -yqq install freetds-dev libsybdb5
&& ln -s /usr/lib/x86_64-linux-gnu/libsybdb.so /usr/lib/libsybdb.so
&& docker-php-ext-install mssql pdo_dblib
&& php -m | grep -oiE '^mssql$'
&& php -m | grep -oiE '^pdo_dblib$'
;else
###########################################################################
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
###########################################################################
# Add Microsoft repo for Microsoft ODBC Driver 13 for Linux
apt-get install -yqq apt-transport-https gnupg lsb-release
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
&& curl https://packages.microsoft.com/config/debian/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
&& apt-get update -yqq
&& ACCEPT_EULA=Y apt-get install -yqq unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
&& ln -sfn /etc/locale.alias /usr/share/locale/locale.alias
&& locale-gen
&& if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then
pecl install pdo_sqlsrv-5.3.0 sqlsrv-5.3.0
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70100" ]; then
pecl install pdo_sqlsrv-5.6.1 sqlsrv-5.6.1
;elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70200" ]; then
pecl install pdo_sqlsrv-5.8.1 sqlsrv-5.8.1
;else
pecl install pdo_sqlsrv sqlsrv
;fi
&& docker-php-ext-enable pdo_sqlsrv sqlsrv
&& php -m | grep -oiE '^pdo_sqlsrv$'
&& php -m | grep -oiE '^sqlsrv$'
;fi
;fi
Stacktrace & Additional info:
The text was updated successfully, but these errors were encountered: