forked from jpf/requestbin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 702 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 702 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
FROM python:2.7-alpine
RUN apk update && apk upgrade && \
apk add \
gcc python python-dev py-pip \
# greenlet
musl-dev \
# sys/queue.h
bsd-compat-headers \
# event.h
libevent-dev \
&& rm -rf /var/cache/apk/*
# want all dependencies first so that if it's just a code change, don't have to
# rebuild as much of the container
ADD requirements.txt /opt/requestbin/
RUN pip install -r /opt/requestbin/requirements.txt \
&& rm -rf ~/.pip/cache
# the code
ADD requestbin /opt/requestbin/requestbin/
EXPOSE 8000
WORKDIR /opt/requestbin
CMD gunicorn -b 0.0.0.0:8000 --worker-class gevent --workers 2 --max-requests 1000 requestbin:app