cmc-sales/Dockerfile

57 lines
1.5 KiB
Docker
Raw Normal View History

2018-11-04 10:38:37 -08:00
FROM ubuntu:lucid
# Set environment variables.
ENV HOME /root
# Define working directory.
WORKDIR /root
RUN sed -i 's/archive/old-releases/' /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y upgrade
# Install apache, PHP, and supplimentary programs. curl and lynx-cur are for debugging the container.
2019-06-29 18:39:27 -07:00
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 libapache2-mod-php5 php5-mysql php5-gd php-pear php-apc php5-curl php5-imap
2018-11-04 10:38:37 -08:00
# Enable apache mods.
#RUN php5enmod openssl
RUN a2enmod php5
RUN a2enmod rewrite
2018-12-15 19:23:18 -08:00
RUN a2enmod headers
2019-06-29 18:42:56 -07:00
2018-11-04 10:38:37 -08:00
# Update the PHP.ini file, enable <? ?> tags and quieten logging.
2019-06-28 19:57:42 -07:00
# RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php5/apache2/php.ini
#RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php5/apache2/php.ini
2019-06-28 20:01:40 -07:00
ADD conf/php.ini /etc/php5/apache2/php.ini
2018-11-04 10:38:37 -08:00
# Manually set up the apache environment variables
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
2019-04-24 21:13:18 -07:00
ARG COMMIT
ENV COMMIT_SHA=${COMMIT}
2018-11-04 10:38:37 -08:00
EXPOSE 80
# Copy site into place.
2018-12-15 19:23:18 -08:00
ADD . /var/www/cmc-sales
RUN mkdir /var/www/cmc-sales/app/tmp
RUN mkdir /var/www/cmc-sales/app/tmp/logs
RUN chmod -R 755 /var/www/cmc-sales/app/tmp
2018-11-04 10:38:37 -08:00
# Update the default apache site with the config we created.
2018-12-15 19:23:18 -08:00
ADD conf/apache-vhost.conf /etc/apache2/sites-available/cmc-sales
RUN a2dissite 000-default
RUN a2ensite cmc-sales
2018-11-04 10:38:37 -08:00
# By default, simply start apache.
CMD /usr/sbin/apache2ctl -D FOREGROUND