title: "Cannot connect to server 'datahost': [Errno -2] Name or service not known", gaierror(-2, 'Name or service not known')
body: <p>I'm getting this error from gitlab-ci. At <code>test</code> stage, I will pull down the latest docker, and run <code>docker run $LatestImage python /path/to/test.py</code>, and the error message came from <code>pytds</code> as a <code>pytds.tds.LoginError</code>. I didn't get this error on local machine because I have set <code>x.x.x.x datahost</code> in local <code>/etc/hosts</code>. So I added one more docker command before the test command: <code>docker run -i --add-host datahost:x.x.x.x $LatestImage cat /etc/hosts</code> and I can see that <code>datahost</code> has been added to that image. However, when I run the test, I still got this error. So I don't know if there's anything else I left, to my current research online it should be a "Forgot to set host" problem. </p>