Cannot connect to server 'datahost': [Errno -2] Name or service not known, gaierror(-2, 'Name or service not known')
The code snippet works locally because I have set datahost in my /etc/hosts, but when I running it on docker, even if I manually add the datahost to docker using docker run -i --add-host before running this test, I still got this error. I know this error is related to the environment, but is there anything else I left? @denisenkom any help?
How I use pytds is like this:
And I'm getting:
The code snippet works locally because I have set
datahost
in my/etc/hosts
, but when I running it on docker, even if I manually add thedatahost
to docker usingdocker run -i --add-host
before running this test, I still got this error. I know this error is related to the environment, but is there anything else I left? @denisenkom any help?