Public | Automated Build

Last pushed: 2 years ago
Dockerfile
FROM ubuntu:trusty MAINTAINER Fernando Mayo <fernando@tutum.co>, Feng Honglin <hfeng@tutum.co> # Install packages ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ apt-get -y install supervisor git apache2 libapache2-mod-php5 mysql-server php5-mysql pwgen php-apc php5-mcrypt php5-curl php5-xdebug php5-dev libpcre3-dev gcc make && \ echo "ServerName localhost" >> /etc/apache2/apache2.conf RUN /bin/echo 'extension=curl.so' > /etc/php5/mods-available/curl.ini RUN /usr/sbin/php5enmod mcrypt #Environment variables to configure php ENV PHP_UPLOAD_MAX_FILESIZE 10M ENV PHP_POST_MAX_SIZE 10M ENV MYSQL_PASS mypass # Add image configuration and scripts ADD start-apache2.sh /start-apache2.sh ADD start-mysqld.sh /start-mysqld.sh ADD run.sh /run.sh RUN chmod 755 /*.sh ADD my.cnf /etc/mysql/conf.d/my.cnf ADD supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf ADD supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf #install phalcon WORKDIR /tmp RUN /usr/bin/git clone https://github.com/phalcon/cphalcon.git && \ cd cphalcon/build/ && \ ./install && \ cd /tmp && \ /bin/rm -rf /tmp/cphalcon/ RUN /bin/echo 'extension=phalcon.so' > /etc/php5/mods-available/phalcon.ini RUN /usr/sbin/php5enmod phalcon # Remove pre-installed database RUN rm -rf /var/lib/mysql/* # Add MySQL utils ADD create_mysql_admin_user.sh /create_mysql_admin_user.sh RUN chmod 755 /*.sh # config to enable .htaccess ADD apache_default /etc/apache2/sites-available/000-default.conf RUN a2enmod rewrite # Configure /app folder with sample app RUN git clone https://github.com/fermayo/hello-world-lamp.git /app RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html # Add volumes for MySQL VOLUME ["/etc/mysql", "/var/lib/mysql", "/app"] EXPOSE 80 3306 CMD ["/run.sh"]
Source Repository