-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
50 lines (37 loc) · 1.07 KB
/
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
42
43
44
45
46
47
48
49
50
FROM debian:latest
MAINTAINER Wenjing Ma
# Update OS
RUN apt-get update -y
# Install Python other things
#RUN apt-get install -y python-pip python-dev build-essential
RUN apt-get update && apt-get install -y apache2 \
libapache2-mod-wsgi \
build-essential \
python \
python-dev\
python-pip \
vim \
&& apt-get clean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/*
# ADD . /app
COPY ./requirements.txt /var/www/apache-flask/requirements.txt
# RUN pip install uwsgi
RUN pip install -r /var/www/apache-flask/requirements.txt
# Copy over the apache configuration file and enable the site
COPY ./apache-flask.conf /etc/apache2/sites-available/apache-flask.conf
RUN a2ensite apache-flask
RUN a2enmod headers
COPY . /var/www/apache-flask/
RUN a2dissite 000-default.conf
RUN a2ensite apache-flask.conf
EXPOSE 80
# ENV HOME /app change to apache-flask
WORKDIR /var/www/apache-flask
RUN mkdir log
RUN touch log/bart-web.log
RUN chown -R www-data:www-data log
RUN chmod -R 775 log
CMD /usr/sbin/apache2ctl -D FOREGROUND
# ENTRYPOINT ["python"]
# CMD ["app.py"]