1- FROM ubuntu:16.04 as temp1
1+ # Base Apache2 Server for Running Django Apps - this file is for docker hub auto build
2+ FROM btr1975/apache-py2-django:1.2
23
34LABEL maintainer="e_ben_75-python@yahoo.com" \
45 important-stopping-note="Stop the server by running apache2ctl stop, this will keep from process hang" \
56 description="This is a base Apache2, Python 2.7.12, Python MySQL-python, and mod_wsgi web server for Django." \
67 package-name="apache-py2-django" \
7- image-version="1.1 " \
8+ image-version="1.3 " \
89 django-version="1.11.2" \
910 django-localflavor-version="1.5.1" \
1011 mysql-python-version="1.2.5"
1112
12- RUN apt-get update && apt-get install -y apache2 \
13- python \
14- python-pip \
15- python-dev \
16- libmysqlclient-dev \
17- libapache2-mod-wsgi \
18- && apt-get clean \
19- && mkdir /DjangoSites \
20- && chmod 755 /DjangoSites \
21- && pip install --upgrade pip \
22- && pip install Django==1.11.2 \
23- && pip install django-localflavor==1.5.1 \
24- && pip install MySQL-python
13+ # Copies the apache conf python script and shell script
2514
26- EXPOSE 80 443
27-
28- ENTRYPOINT ["apache2ctl" , "-D" , "FOREGROUND" ]
29-
30-
31- FROM temp1 as temp2
32-
33- LABEL image-version="1.2"
34-
35- # Copies the apache conf python script
36-
37- COPY ./apache-site-conf.py /bin/
38-
39- RUN chmod 755 /bin/apache-site-conf.py
15+ COPY ./apache-site-conf.sh /bin/
16+ COPY ./apache-site-conf.py /bin/
4017
4118# Arguments for Apache conf file builder script if not used, they will use default settings
19+ # Also it will only allow them if there is only one site directory if there
20+ # is more it will use default, and you will need to modify manually
4221# SITE_SERVER_NAME = ServerName
4322# SITE_SERVER_ADMIN = ServerAdmin
4423
@@ -49,13 +28,9 @@ ARG SITE_SERVER_ADMIN
4928
5029WORKDIR /DjangoSites
5130
31+ RUN chmod 755 /bin/apache-site-conf.sh \
32+ && chmod 755 /bin/apache-site-conf.py
5233
53- FROM temp2 as temp3
54-
55- LABEL image-version="1.3"
56-
57- # Copies the apache conf shell script
58-
59- COPY ./apache-site-conf.sh /bin/
34+ EXPOSE 80 443
6035
61- RUN chmod 755 /bin/apache-site-conf.sh
36+ ENTRYPOINT [ "apache2ctl" , "-D" , "FOREGROUND" ]
0 commit comments