Last active
August 21, 2020 01:28
-
-
Save csotomon/d329e5e5f73c6e47986f37ceae368479 to your computer and use it in GitHub Desktop.
Azure Function with dockers lab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To enable ssh & remote debugging on app service change the base image to the one below | |
# FROM mcr.microsoft.com/azure-functions/python:3.0-python3.8-appservice | |
FROM mcr.microsoft.com/azure-functions/python:3.0-python3.8 | |
# install FreeTDS and dependencies | |
RUN apt-get update \ | |
&& apt-get install unixodbc -y \ | |
&& apt-get install unixodbc-dev -y \ | |
&& apt-get install freetds-dev -y \ | |
&& apt-get install freetds-bin -y \ | |
&& apt-get install tdsodbc -y \ | |
&& apt-get install --reinstall build-essential -y | |
# populate "ocbcinst.ini" | |
RUN echo "[FreeTDS]\n\ | |
Description = FreeTDS unixODBC Driver\n\ | |
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so\n\ | |
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so" >> /etc/odbcinst.ini | |
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ | |
AzureFunctionsJobHost__Logging__Console__IsEnabled=true | |
COPY requirements.txt / | |
RUN pip install -r /requirements.txt | |
COPY . /home/site/wwwroot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment