Closed takanamito closed 5 years ago
~When you do docker run
, you'll need to forward the port to the container host. eg, docker run -p 1433:1433 my_tiny_tds:latest
~
e: sorry, misread what was running; thought this was a database container. Still, check that the server is otherwise accessible (including the server host ip from inside the container environment) :)
Hi, I am SRE from the same company with takanamito, and investigated this problem. The root cause was https://github.com/FreeTDS/freetds/issues/299 "TLS handshake failed on Debian buster", not caused by Docker version.
Following change worked as a workaround for now.
- FROM ruby:2.6.3
+ FROM ruby:2.6.3-stretch
I had to reinstall freetds, so then it worked.
sudo apt-get install wget sudo apt-get install build-essential sudo apt-get install libc6-dev wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.2.tar.gz tar -xzf freetds-1.2.tar.gz cd freetds-1.2 ./configure --prefix=/usr/local --with-tdsver=7.3 sudo make sudo make install
I'm trying to connect to SQL Server 2014 using tiny_tds in docker container.
TinyTDS::Client.new
raises exception.Adaptive Server connection failed (xx.xx.xx.xx:1433) (TinyTds::Error)
I tried to build by several version of docker (17.09.0, 18.09.0, 18.09.1).
It was found to connect DB successful with container only built by docker 18.09.2 (Docker for mac).
The same error occured other than macOS.
standard:2.0-1.11.0
x Docker version 18.09.6, build 481bc77Sample Code
I tried to build some docker containers.
But only docker 18.09.2(Docker for Mac) can build container image connectable to db.
Other tiny_tds ver(2.1.1), freeTDS ver(1.1.1, 1.1.10, 1.1.11) too.
Dockerfile
sample.rb
Build and run.
Environment