-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathDockerfile
41 lines (23 loc) · 958 Bytes
/
Dockerfile
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
# MAINTAINER Gevin <[email protected]>
# DOCKER-VERSION 1.6.2
#
# Dockerizing Ubuntu: Dockerfile for building Ubuntu images
FROM ubuntu:14.04
MAINTAINER Gevin <[email protected]>
RUN apt-get update && apt-get install -y curl vim && \
apt-get install -y nginx git python-dev python-pip libpq-dev postgresql-client && \
apt-get clean all
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN pip install supervisor uwsgi
ADD supervisord.conf /etc/supervisord.conf
RUN mkdir -p /etc/supervisor.conf.d && \
mkdir -p /var/log/supervisor
RUN mkdir -p /usr/src/app && mkdir -p /var/log/uwsgi
WORKDIR /usr/src/app
ADD requirements.txt /usr/src/app/requirements.txt
RUN pip install -r /usr/src/app/requirements.txt
COPY . /usr/src/app
RUN ln -s /usr/src/app/mayblog_nginx.conf /etc/nginx/sites-enabled
RUN /usr/bin/python2.7 manage.py collectstatic --noinput
EXPOSE 8000
CMD ["/bin/bash", "/usr/src/app/init.sh"]