Search code examples
windowsazuredockerflaskdeployment

How to install MS Access Driver to my docker image? Or is there any other work around this problem?


Application Background: Trying to deploy an automation application where user selects *access file and visualize graphs from the python flask backend calculation.

Locally, Downloaded "Access Driver": https://www.microsoft.com/en-us/download/details.aspx?id=54920 [which ran fine]. But unable to deploy on Azure.

Things that I have tried:

  1. I have tried to run this application using Github CI/CD but with Github actions azure can only give option to run on linux os. which will give me the same error (pyodbc connection)

  2. Build Docker image that could eliminate this error however, when selected 'FROM python:slim-buster' under Dockerfile - It generated docker image with linux which gives the same error.

error with linux os

Also, tried adding windows OS in the Dockerfile using FROM microsoft/nanoserver, still received an error while creating an image. error with windows os

I am new to all these and think might be making mistakes. Any help will be appreciated.


Solution

  • So After a lot of trial and error, I was able to deploy on windows server on Azure.

    What worked:

    Deploying application on windows server with ODBC driver (AccessDatabaseEngine.exe). Not the 64bit(AccessDatabaseEngine_X64.exe).

    One can deploy using Docker image also but ** FROM microsoft/nanoserver ** was not able to build any image. Instead try with ** FROM mcr.microsoft.com/windows/servercore:ltsc2019 **