-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
34 lines (27 loc) · 997 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
25
26
27
28
29
30
31
32
33
34
FROM python:3.7.2-slim-stretch
RUN apt-get update \
&& apt-get install -y \
curl \
apt-transport-https \
make \
build-essential \
unixodbc \
unixodbc-dev \
gnupg2 \
tzdata
RUN ln -fs /usr/share/zoneinfo/America/Fortaleza /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
RUN pip install --upgrade pip
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools -y
RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
RUN echo "---> Cleaning up" \
&& apt-get autoremove -y \
&& apt-get autoclean -y \
&& apt-get clean -y \
&& rm -rf /tmp/*
ADD ./requirements.txt .
RUN pip install -r requirements.txt
WORKDIR /application