-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 886 Bytes
/
Dockerfile
File metadata and controls
35 lines (28 loc) · 886 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
# gunicorn-flask
FROM ubuntu:12.04
MAINTAINER Niu Feng <jumpbeandev@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
autoconf \
automake \
file \
g++ \
gcc \
make \
patch \
libssl-dev \
libffi-dev
RUN apt-get install -y --no-install-recommends libevent-dev
RUN apt-get install -y python python-dev python-pip python-virtualenv gunicorn
RUN rm -rf /var/lib/apt/lists/*
# Setup flask application
#RUN mkdir -p /deploy/app
COPY gunicorn_config.py /var/www/gunicorn_config.py
COPY daya /var/www/app
RUN pip install -r /var/www/app/requirements.txt
RUN pip install greenlet eventlet gevent
WORKDIR /var/www/app
EXPOSE 5000
# Start gunicorn
CMD ["/usr/bin/gunicorn", "--config", "/var/www/gunicorn_config.py", "run_server:app"]