11# Base Apache2 Server for Running Django Apps - this file is for docker hub auto build
2- FROM btr1975/apache-py2-django:1.2
2+ FROM ubuntu:16.04
33
44LABEL maintainer="e_ben_75-python@yahoo.com" \
55 important-stopping-note="Stop the server by running apache2ctl stop, this will keep from process hang" \
66 description="This is a base Apache2, Python 2.7.12, Python MySQL-python, and mod_wsgi web server for Django." \
77 package-name="apache-py2-django" \
8- image-version="1.3 " \
8+ image-version="1.4 " \
99 django-version="1.11.2" \
1010 django-localflavor-version="1.5.1" \
1111 mysql-python-version="1.2.5"
@@ -15,21 +15,33 @@ LABEL maintainer="e_ben_75-python@yahoo.com" \
1515COPY ./apache-site-conf.sh /bin/
1616COPY ./apache-site-conf.py /bin/
1717
18- # 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
21- # SITE_SERVER_NAME = ServerName
22- # SITE_SERVER_ADMIN = ServerAdmin
23-
24- ARG SITE_SERVER_NAME
25- ARG SITE_SERVER_ADMIN
18+ # Environment variables for Apache conf file builder script if not used, they will use default settings
19+ # SITE_SERVER_NAME=www.example.com
20+ # SITE_SERVER_ADMIN=webmaster@localhost
21+ # SITE_DIRECTORY_NAME=MySiteDir
22+ ENV SITE_SERVER_NAME=www.example.com
23+ ENV SITE_SERVER_ADMIN=webmaster@localhost
24+ ENV SITE_DIRECTORY_NAME=MySiteDir
2625
2726# Directory where Django Sites go
2827
2928WORKDIR /DjangoSites
3029
3130RUN chmod 755 /bin/apache-site-conf.sh \
3231 && chmod 755 /bin/apache-site-conf.py
32+ apt-get update && apt-get install -y apache2 \
33+ python \
34+ python-pip \
35+ python-dev \
36+ libmysqlclient-dev \
37+ libapache2-mod-wsgi \
38+ && apt-get clean \
39+ && mkdir /DjangoSites \
40+ && chmod 755 /DjangoSites \
41+ && pip install --upgrade pip \
42+ && pip install Django==1.11.2 \
43+ && pip install django-localflavor==1.5.1 \
44+ && pip install MySQL-python
3345
3446EXPOSE 80 443
3547
0 commit comments