I am using a windows docker. I have added pyodbc in requirements.txt. Again i have added a separate command to install pyodbc Python explicitly. Still I am getting errors while running the docker image. What should be correct way to import all the modules mentioned in requirements.txt
Commands I have in docker file:-
FROM python:3.7
RUN mkdir /code
WORKDIR /code
ENV PYTHONPATH /code
COPY ./tools/installers/msodbcsql_17.4.2.1_x64.msi ./msodbcsql_17.4.2.1_x64.msi
RUN Start-Process msiexec.exe -Wait -ArgumentList '/I msodbcsql_17.4.2.1_x64.msi /norestart /qn
IACCEPTMSODBCSQLLICENSETERMS=YES'
RUN pip install pyodbc
RUN pip install -r requirements.txt
CMD ["python", "./main.py"]
I am getting below errors:-
Traceback (most recent call last):
File "./main.py", line 7, in <module>
from azure_resources.database import Database
File "C:\code\azure_resources\database.py", line 1, in <module>
import pyodbc
ImportError: DLL load failed: The specified module could not be found.