title: Cannot connect to SQL Database on Docker
body: <p>I have configured docker with db on it</p>
  
  <p>Here is how I download sql</p>
  
  <pre><code>docker pull microsoft/mssql-server-linux:2017-latest
  </code></pre>
  
  <p>Then I do this command</p>
  
  <pre><code>docker run -e "ACCEPT_EULA=Y" -e  'SA_PASSWORD=$cthulhu1988' -p 1433:1433 --name test -d microsoft/mssql-server-linux:2017-latest
  </code></pre>
  
  <p>and then I tried to connect to it via this command</p>
  
  <pre><code>docker exec -it test /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '$cthulhu1988'
  </code></pre>
  
  <p>But I get this error</p>
  
  <pre><code>**Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user 'SA'..**
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I make <code>ipconfig</code>
  And tried to do this with my Ipv4 address</p>
  
  <pre><code>docker exec -it test /opt/mssql-tools/bin/sqlcmd -S 10.0.75.1 -U SA -P '$cthulhu1988'
  </code></pre>
  
  <p>Now I have this errors</p>
  
  <blockquote>
    <p>Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
    Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x102.
    Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..</p>
  </blockquote>
  
  <p>I Cheched, tcp\ip enabled</p>
  
  <p>Where can be my mistake?</p>