-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
50 lines (42 loc) · 1.38 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM python:2.7.14
MAINTAINER Aaron Browne <[email protected]>
# Install Oracle client C header files.
COPY lib/ /app/lib/
RUN apt-get -qq update && apt-get -qq install -y unzip
RUN unzip -qq /app/lib/instantclient-basic-linux.x64-11.2.0.4.0.zip \
-d /usr/local/lib
RUN unzip -qq /app/lib/instantclient-sdk-linux.x64-11.2.0.4.0.zip \
-d /usr/local/lib
RUN ln -s /usr/local/lib/instantclient_11_2/libclntsh.so.11.1 \
/usr/local/lib/instantclient_11_2/libclntsh.so
# Set Oracle environment variables
ENV ORACLE_HOME /usr/local/lib/instantclient_11_2
ENV LD_LIBRARY_PATH /usr/local/lib/instantclient_11_2
# Install Oracle (libaio1) and Postgres (libpq-dev)
# and MSSQL (unixodbc-dev) and ERAlchemy (graphviz)
# package dependencies.
RUN apt-get -qq update && \
apt-get -qq install -y \
graphviz \
libaio1 \
libpq-dev \
unixodbc-dev && \
rm -rf /var/lib/apt/lists/*
# Finally install Python dependencies.
COPY requirements.txt /app/
RUN pip install \
"cx-Oracle>=5.2,<=5.3" \
ERAlchemy==0.0.28 \
gunicorn==19.3.0 \
MySQL-python==1.2.5 \
psycopg2==2.6 \
pygraphviz==1.3.1 \
pyodbc==3.0.10
# Copy app files.
COPY . /app/
# Install app.
RUN pip install /app/
# Set up run environment.
EXPOSE 80
WORKDIR /app
CMD ["gunicorn", "--bind=0.0.0.0:80", "--workers=4", "dmsa.service:build_app(\"http://data-models-service.research.chop.edu/\")"]