Created
October 29, 2015 07:09
-
-
Save slava-konashkov/3fc2365d67da6aef82f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:14.04 | |
| MAINTAINER Slava Konashkov <slava.konashkov@gmail.com> | |
| # Install packages | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN apt-get update && \ | |
| apt-get install -y software-properties-common && \ | |
| LANG=C.UTF-8 add-apt-repository ppa:ondrej/php5-5.6 && \ | |
| apt-get update && \ | |
| apt-get -y install supervisor apache2 libapache2-mod-php5 mysql-server php5-mysql pwgen php-apc php5-mcrypt && \ | |
| echo "ServerName localhost" >> /etc/apache2/apache2.conf | |
| # 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 | |
| # 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 mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html | |
| #Enviornment variables to configure php | |
| ENV PHP_UPLOAD_MAX_FILESIZE 10M | |
| ENV PHP_POST_MAX_SIZE 10M | |
| # Add volumes for MySQL | |
| VOLUME ["/etc/mysql", "/var/lib/mysql" ] | |
| EXPOSE 80 | |
| CMD ["/run.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment