Klaus

msodbcsql17 Buster

 Fri, 21 Feb 2020 19:26:12 +0100 
After a recent php:7.3-apache Docker image rebuild we were not able to connect to the M$SQL server anymore from our PHP application inside the docker container. Seems to be related with the Debian 9 (Stretch) --> Debian 10 (Buster) update of the official PHP base image.

The error message with the new container was:
[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746
[Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection

Too lazy to find a proper solution right now, but a quick fix is to add following code to our Dockerfile:
RUN sed -i 's/SECLEVEL=2/SECLEVEL=1/g' /etc/ssl/openssl.cnf
Another lessons learned is to use the right base image tag e.g.: php:7.3-apache-stretch
elmussol
 Fri, 21 Feb 2020 19:29:52 +0100 
I am not Docker proficient but Stretch to Buster involves a PHP 7.0 to 7.3 update. This may pertinent (or not).
Klaus
 Fri, 21 Feb 2020 22:57:40 +0100 
In these Docker images they don't use the Debian PHP packages. ;-) PHP is compiled from source.