-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-flask
31 lines (24 loc) · 1.01 KB
/
Dockerfile-flask
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
# image: tapis/flaskbase
# Base image for building Tapis API services in Python/flask
FROM python:3.7
RUN useradd tapis -u 4872
ADD requirements-flask.txt /home/tapis/tapisservice-requirements.txt
# TODO -- eventually remove this
RUN apt-get update && apt-get install -y vim
# Install requirements and tapipy/tapisservice(inside of requirements.txt) packages.
RUN pip install -U --no-cache-dir pip && \
pip install --no-cache-dir -r /home/tapis/tapisservice-requirements.txt
# Set flask defaults and envs.
# set default worker class, workers, and threads for gunicorn
ENV workerCls=gthread
ENV processes=2
ENV threads=3
ENV timeoutSeconds=60
# set the FLASK_APP var to point to the api.py module in the default location
ENV FLASK_APP service/api.py
WORKDIR /home/tapis
# TODO -- add/remove this line to work with a local install of tapisservice
# COPY tapisservice /usr/local/lib/python3.7/site-packages/tapisservice
COPY flask_service_entry.sh /home/tapis/entry.sh
RUN chmod +x /home/tapis/entry.sh
CMD ["./entry.sh"]