-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy pathDockerfile_py2
More file actions
42 lines (32 loc) · 1.12 KB
/
Dockerfile_py2
File metadata and controls
42 lines (32 loc) · 1.12 KB
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
37
38
39
40
41
42
# MAINTAINER Gevin <flyhigher139@gmail.com>
# DOCKER-VERSION 18.03.0-ce, build 0520e24
FROM ubuntu:14.04
LABEL maintainer="flyhigher139@gmail.com"
COPY sources.list /etc/apt/sources.list
COPY pip.conf /root/.pip/pip.conf
RUN apt-get update && apt-get install -y \
vim \
nginx \
build-essential \
python-dev \
python-pip \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/* \
&& pip 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 pip install --no-cache-dir supervisor gunicorn && \
pip install --no-cache-dir -r /usr/src/app/requirements.txt && \
# to fix six bugs
pip install --ignore-installed six
COPY . /usr/src/app
RUN echo "daemon off;" >> /etc/nginx/nginx.conf && \
ln -s /usr/src/app/octblog_nginx.conf /etc/nginx/sites-enabled
ENV PORT 8000
EXPOSE 8000 5000
# CMD ["/usr/local/bin/supervisord", "-n"]
CMD ["/usr/local/bin/supervisord", "-n", "-c", "/usr/src/app/supervisord.conf"]