-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathDockerfile_py3
36 lines (27 loc) · 976 Bytes
/
Dockerfile_py3
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
# MAINTAINER Gevin <[email protected]>
# DOCKER-VERSION 18.03.0-ce, build 0520e24
FROM ubuntu:14.04
LABEL maintainer="[email protected]"
COPY sources.list /etc/apt/sources.list
COPY pip.conf /root/.pip/pip.conf
RUN apt-get update && apt-get install -y \
build-essential \
python3 \
python3-dev \
python3-pip \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install -U pip
RUN mkdir -p /etc/supervisor.conf.d && \
mkdir -p /var/log/supervisor && \
mkdir -p /usr/src/app && \
mkdir -p /var/log/gunicorn
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/requirements.txt
RUN pip3 install --no-cache-dir gunicorn && \
pip3 install --no-cache-dir -r /usr/src/app/requirements.txt && \
pip3 install --ignore-installed six
COPY . /usr/src/app
ENV PORT 8000
EXPOSE 8000 5000
CMD ["/usr/local/bin/gunicorn", "-w", "2", "-b", ":8000", "manage:app"]