FROM ubuntu:latest
4 # Install apache, PHP, and supplimentary programs. openssh-server, curl, and lynx-cur are for debugging the container.
5 RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive
6 apt-get -y install software-properties-common
7 RUN apt-add-repository ppa:ondrej/php && apt-get update -y
8 RUN DEBIAN_FRONTEND=noninteractive apt-get -y install
9 apache2 php7.0 php7.0-mysql libapache2-mod-php7.0 curl
10
11 # Enable apache mods.
12 RUN a2enmod php7.0
13 RUN a2enmod rewrite
14
15 # Update the PHP.ini file, enable tags and quieten logging.
16 RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php/7.0/apache2/php.ini
17 RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php/7.0/apache2/php.ini
18
19 # Manually set up the apache environment variables
20 ENV APACHE_RUN_USER www-data
21 ENV APACHE_RUN_GROUP www-data
22 ENV APACHE_LOG_DIR /var/log/apache2
23 ENV APACHE_LOCK_DIR /var/lock/apache2
24 ENV APACHE_PID_FILE /var/run/apache2.pid
25
26 # Expose apache.
27 EXPOSE 80
28
29 # Copy this repo into place.
30 ADD www /var/www/site
31
32 # Update the default apache site with the config we created.
33 ADD apache-config.conf /etc/apache2/sites-enabled/000-default.conf
34
35 # By default start up apache in the foreground, override with /bin/bash for interative.
36 CMD /usr/sbin/apache2ctl -D FOREGROUND
Content type
Image
Digest
Size
111.2 MB
Last updated
almost 6 years ago
docker pull kkelaskar/assignment2