title: Docker timeout error mssql17 connection on M1 arm64 architecture
body: <p>Could you please help me resolve this issue:</p>
  <p>I must to say that everything is working fine on Windows amd64 architecture
  But when I tried to start docker-compose on arm64 M1 it went wrong and makes the error</p>
  <p>So I have these 2 Dockerfiles</p>
  <pre><code>FROM --platform=linux/amd64 python:3.9-buster as builder
  
  WORKDIR ...
  
  COPY ...
  
  RUN apt-get update &amp;&amp; apt-get install -y git g++ libgirepository1.0-dev unixodbc unixodbc-dev pkg-config libcairo2-dev gcc python3-dev
  
  RUN pip install virtualenv &amp;&amp;\
      python -m venv antenv
  
  RUN . antenv/bin/activate &amp;&amp;\
      python -m ensurepip --upgrade &amp;&amp;\
      pip install --upgrade pip &amp;&amp;\
      pip install wheel gobject PyGObject &amp;&amp;\
      pip install -r requirements.txt
  
  FROM --platform=linux/amd64 python:3.9-slim
  
  WORKDIR ...
  
  COPY --from=builder ...
  
  RUN apt-get update &amp;&amp; apt-get install curl gnupg -y
  RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - &amp;&amp;\
      curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list &gt; /etc/apt/sources.list.d/mssql-release.list &amp;&amp;\
      apt-get update &amp;&amp;\
      ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools -y &amp;&amp;\
      apt-get install -y unixodbc python3-gi gir1.2-secret-1 alembic &amp;&amp;\
      . antenv/bin/activate &amp;&amp; pip install gunicorn &amp;&amp;\
      mkdir -p /opt/antenv/nltk_data
  
  EXPOSE 5000
  
  CMD . antenv/bin/activate &amp;&amp; alembic -x data=true upgrade head &amp;&amp; gunicorn wsgi:app -w 1 --worker-class eventlet --threads 2 --forwarded-allow-ips=* -b 0.0.0.0:5000
  </code></pre>
  <p>and DataBase:</p>
  <pre><code>FROM --platform=linux/amd64 mcr.microsoft.com/mssql/server:2017-latest
  
  WORKDIR /opt/mssql/
  
  # Bundle config source
  COPY ./*.sh /opt/mssql/bin/
  
  RUN chmod +x /opt/mssql/bin/*.sh
  
  ENTRYPOINT [&quot;./bin/entrypoint.sh&quot;]
  
  CMD [&quot;tail -f /dev/null&quot;]
  </code></pre>
  <p>As you can see <strong>I mentioned everywhere that it is linux/amd64 platform</strong></p>
  <p>DataBase is upping good and I don`t get eerors
  But when I up Backend, It as if does not see database and I get timeout error</p>
  <pre><code>backend  | sqlalchemy.exc.OperationalError: (pyodbc.OperationalError) ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')
  backend  | (Background on this error at: https://sqlalche.me/e/14/e3q8)
  </code></pre>