msphpsql
msphpsql copied to clipboard
Add this driver to the alpine linux php docker image
Alpine linux uses a smaller libc than ubuntu and redhat and produces really small docker images. There are official php docker images on docker hub that use this. One installs an extension on them via the command docker-php-ext-install
this compiles the extension from source and setups up an INI file for it.
I have not determined if any of the following tasks are already done:
- Compile this driver on alpine linux. If this works can someone at MSFT setup travis CI to do this?
- Get whoever maintains the alpine linux php docker images on board with this
- Create a pull request so
docker-php-ext-install
will pull the driver.
AFAIK, the ODBC driver from Microsoft is not compatible with Alpine because of musl's libc.
@zippy1981 We can get the PHP Driver to compile on Alpine Linux but the ODBC Driver as @mimetnet mentioned, is not compatible with Alpine. We do have a docker image that you can use for now: https://hub.docker.com/r/lbosqmsft/php-mssql/. We are looking into supporting additional distros (alpine, debian etc.) We will keep you posted.
Not sure, but may be this can help with libc: https://github.com/docker/compose/blob/master/Dockerfile.run
Can it work with http://www.unixodbc.org/? Alpine already has in repositories
Any progress on that?
Any updates?
@ruudboon No updates. Alpine still is not a supported Linux distribution for the ODBC Driver. We will keep Alpine in mind as we evaluate supporting additional distributions.
Regards, David
This is becoming a dealbreaker for me, especially as I attempt to put more of my apps into docker, using alpine, which is more-or-less best practice for most situations.
Is there any way, even with some hacks, to get this working in alpine?
perhaps this image is suitable for installing msphpsql https://github.com/frol/docker-alpine-glibc
It would be awesome to see support for Alpine
Dear Microsoft, please note that everybody is creating containers on Alpine distro's, could you please help my DevOps life?
Br
It would be awesome to see support for Alpine Linux 👍
update..?
It's in our backlog, but as @David-Engel said above:
No updates. Alpine still is not a supported Linux distribution for the ODBC Driver. We will keep Alpine in mind as we evaluate supporting additional distributions.
Is there any progress?
There will "never" be. Thats why the open source community struggles so much against Java and other technologies. Very academic interests point of view, only. We simply gave up using Alpine and moved on.
Em qui, 8 de nov de 2018 às 05:30, herojhc [email protected] escreveu:
Is there any progress?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/msphpsql/issues/300#issuecomment-436899033, or mute the thread https://github.com/notifications/unsubscribe-auth/ALM6U3zWybsBZiW9qScI8dHpuowcYroJks5us92sgaJpZM4MJ48f .
--
Andre Luiz / IT and Trading [email protected] / +55 11 984129269
[image: Linkedin] http://br.linkedin.com/in/bahuan[image: skype] http://alosilva86
Thats why the open source community struggles so much against Java and other technologies
Isn't it the other way around? The open source community doesn't struggle. Microsoft struggles to support new technology like docker / alpine.
We simply gave up using Alpine and moved on.
That's easy for you to say, but alpine provides a benefit to many users, and many containers and environments are build on it. It's far from "academic." It's "I have hundreds of alpine containers, and if this driver doesn't work on alpine, I can't use it."
By not supporting alpine, they're not supporting a place where their users want to run their software.
Microsoft struggles to support new technology like docker / alpine.
Microsoft fully supports Docker containers and is very much on board with that model. Alpine is just one Linux distribution that happens to be optimized for the container model.
Supporting another platform is not just adding some code and some tests to your existing code base and CI. It also means ensuring all your dependencies are on the new platform, creating new packaging and new test (and probably build) infrastructure that has to be maintained going forward. That all costs money and money is not infinite so people have to prioritize. Alpine has a lot going for it and it is getting a lot of traction in the container world. That has not gone unnoticed.
looking for msodbcsql17 for alpine too maybe it's time to move to centos ......
One more 👍 thumbsup vote for Microsoft ODBC support for alpine
Currently test script doesn't work.
php -i | grep sqlsrv
/etc/php7/conf.d/30-sqlsrv.ini,
/etc/php7/conf.d/35-pdo_sqlsrv.ini,
Registered PHP Streams => compress.zlib, https, ftps, php, file, glob, data, http, ftp, zip, phar, sqlsrv
PDO drivers => dblib, sqlsrv
pdo_sqlsrv
pdo_sqlsrv support => enabled
pdo_sqlsrv.client_buffer_max_kb_size => 10240 => 10240
pdo_sqlsrv.log_severity => 0 => 0
sqlsrv
sqlsrv support => enabled
<?php
$conn_array = array (
"UID" => "sa",
"PWD" => "secretpassword",
"Database" => "testdatabase",
);
$conn = sqlsrv_connect("192.168.1.3, 5555", $conn_array);
if ($conn){
echo "connected";
if(($result = sqlsrv_query($conn,"SELECT * FROM dbo.table")) !== false){
while( $obj = sqlsrv_fetch_object( $result )) {
echo $obj->colName.'<br />';
}
}
}else{
die(print_r(sqlsrv_errors(), true));
}
Array
(
[0] => Array
(
[0] => IMSSP
[SQLSTATE] => IMSSP
[1] => -49
[code] => -49
[2] => This extension requires the Microsoft ODBC Driver for SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x64: https://go.microsoft.com/fwlink/?LinkId=163712
[message] => This extension requires the Microsoft ODBC Driver for SQL Server. Access the following URL to download the ODBC Driver for SQL Server for x64: https://go.microsoft.com/fwlink/?LinkId=163712
)
)
Tried to make frankenstein with FROM frolvlad/alpine-glibc alpine with glibc hackish way
bash-4.4# apk add nano
(1/2) Installing libmagic (5.36-r0)
(2/2) Installing nano (3.2-r0)
Executing busybox-1.29.3-r10.trigger
Executing glibc-bin-2.29-r0.trigger
/usr/glibc-compat/sbin/ldconfig: /usr/lib/libsodium.so.23 is not a symbolic link
OK: 78 MiB in 92 packages
bash-4.4# ldd /usr/lib/libsodium.so.23
ldd (0x7f60dfa83000)
libc.musl-x86_64.so.1 => ldd (0x7f60dfa83000)
alpine glibc version doesn't have docker-php-ext-install
+ docker-php-ext-install pdo_dblib
/bin/sh: docker-php-ext-install: not found
So fallbacked to pecl install with apk add g++ make
I would also like for this to happen, does anyone know the team internally at Microsoft? I would like to try and work with them.
Please, DM me if you have any contacts at Microsoft that can help with this situation or if you know the team working on it.
@ZaxLofful Most of the top contributors here are working for Microsoft. I'm the PM for drivers for SQL Server. Alpine support is on the roadmap for the ODBC and PHP drivers. It's just a matter of getting it prioritized and funded. See my previous comment for details. Upvoting this issue provides the best user feedback to the right people for getting Alpine support prioritized.
@David-Engel
It's just a matter of getting it prioritized and funded.
It would be so nice to use alpine based containers connecting to mssql containers, and mssql is a good product right? The funds shouldn't be a problem (my opinion) cause the entry level for using mssql would be lower when the drivers are easily integrated. I mean there are so much use-cases to prefer mssql above other sql solutions.
I agree with you, this is the kind of issue that makes the relevance/demand to be a priority.
On Wed, Jul 17, 2019, 12:43 David Engel [email protected] wrote:
@ZaxLofful https://github.com/ZaxLofful Most of the top contributors here are working for Microsoft. I'm the PM for drivers for SQL Server. Alpine support is on the roadmap for the ODBC and PHP drivers. It's just a matter of getting it prioritized and funded. See my previous comment https://github.com/microsoft/msphpsql/issues/300#issuecomment-439560083 for details. Upvoting this issue provides the best user feedback to the right people for getting Alpine support prioritized.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/msphpsql/issues/300?email_source=notifications&email_token=ACZTUU45FEU2P2N25S3N5M3P7443BA5CNFSM4DBHR4P2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2E2J3Y#issuecomment-512337135, or mute the thread https://github.com/notifications/unsubscribe-auth/ACZTUUYEHF4BSLE4W63U7FLP7443BANCNFSM4DBHR4PQ .
We've been using Pymssql, but are now being forced to switch to pyodbc due to the issue above. We're running Alpine on our containers, so we're hopeful that an Alpine-compatible driver can be released soon.
@devrsw as mentioned above,
Alpine support is on the roadmap for the ODBC and PHP drivers.
Please stay tuned.
@yitam That would be so cool. However, trying to keep realistic expectations....we have been waiting for such things as (official) AD authentication (in the case of mssql for linux), and been told "weeks to months", which have turned into years.... :)
Ray of light: Alpine support in the MS ODBC Driver for SQL Server is being worked on right now and should be done for the next MS ODBC driver release. The PHP drivers are also planned to be released with Alpine support about the same time (obviously ODBC dependent).
Ray of light: Alpine support in the MS ODBC Driver for SQL Server is being worked on right now and should be done for the next MS ODBC driver release. The PHP drivers are also planned to be released with Alpine support about the same time (obviously ODBC dependent).
Thank you. Can you please provide a rough next MS ODBC driver release date?