-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile.flask
More file actions
executable file
·35 lines (26 loc) · 1001 Bytes
/
Dockerfile.flask
File metadata and controls
executable file
·35 lines (26 loc) · 1001 Bytes
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
FROM python:3.8
MAINTAINER Fabian Sinz <sinz@bcm.com>, Cameron Smith <camerons@bcm.edu>, Christos Papadopoulos <cpapadop@bcm.com>
# Defines where the app will be run from
ENV APP /app
RUN mkdir $APP
WORKDIR $APP
# Expose the port uWSGI will listen on
EXPOSE 5000
# Install ubuntu packages
RUN apt-get update
# RUN apt install -y graphviz libffi6 libffi-dev libssl-dev
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Chicago
RUN apt-get install -y tzdata
# Upgrade pip
RUN pip3 install --upgrade pip
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip3 install --upgrade setuptools # otherwise cairocffi cannot be installed (https://github.com/lief-project/LIEF/issues/108)
RUN pip3 install --upgrade git+https://github.com/atlab/datajoint-python
RUN pip3 install -r requirements.txt
# We copy the rest of the codebase into the image
COPY . .
# Run uWSGI with its ini file.
# Might be better to use entrypoint here?
CMD [ "uwsgi", "--enable-threads", "--ini", "app.ini" ]