forked from woodlee/sqlserver-plan-regression-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (18 loc) · 738 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.9.10-buster
WORKDIR /tmp
RUN apt-get update && apt-get install -y unixodbc unixodbc-dev wget build-essential libc6-dev tdsodbc
RUN wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.2.5.tar.gz
RUN tar -xzf freetds-1.2.5.tar.gz
WORKDIR /tmp/freetds-1.2.5
RUN ./configure --prefix=/usr/local --with-tdsver=7.4
RUN make
RUN make install
WORKDIR /srv
RUN rm -rf /tmp/freetds-1.2.5
RUN echo "[FreeTDS]\nDriver = FreeTDS\nDescription = FreeTDS\nTrace = No" >> odbc.ini
RUN echo "[FreeTDS]\nDescription=FreeTDS\nDriver=/usr/local/lib/libtdsodbc.so\nUsageCount=1" >> odbcinst.ini
ENV ODBCSYSINI=/srv
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY plan_monitor ./plan_monitor
ENTRYPOINT ["python", "-m"]