title: Dockerfile can't open ODBC driver 17 and fails during running the python script
body: <p>I have create in docker 2 contains 1 to run the MSSQL server and the other a python container with the code to read data from an .xlsx file and inserting it into SQL server. </p>
  
  <p>My <strong>Dockerfile</strong> has the below code :</p>
  
  <pre><code>FROM python:3.6-alpine
  RUN apk update
  RUN apk add gcc libc-dev g++ libffi-dev libxml2 unixodbc-dev mariadb-dev postgresql-dev
  FROM continuumio/miniconda3
  
  ADD test.py /
  
  RUN apt-get update -y \
      &amp;&amp; apt install python3 -y \
      &amp;&amp; apt install python3-pip -y \
      &amp;&amp; apt install python3-venv -y \
      &amp;&amp; python3 -m venv venv
  
  
  RUN apt-get -y install curl
  
  **#Install FreeTDS and dependencies for PyODBC**
  RUN apt-get update &amp;&amp; apt-get install -y tdsodbc unixodbc-dev \
   &amp;&amp; apt install unixodbc-bin -y  \
   &amp;&amp; apt-get clean -y
  
  RUN apt-get update
  RUN apt-get install -y tdsodbc unixodbc-dev
  RUN apt install unixodbc-bin -y
  RUN apt-get clean -y
  
  RUN pip install pandas
  RUN pip install pyodbc
  RUN pip install DateTime
  RUN pip install multiprocess
  RUN pip install threaded
  
  CMD [ "python", "./test.py" ]
  </code></pre>
  
  <p>It compiles successfully but fails every time i run the container with the below error :</p>
  
  <p>pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")</p>
  
  <p>I have been trying this for days but found no resolution.</p>
  
  <p>Believe I need to install ODBC driver 17, if so how do I add it to my Dockerfile?</p>