Created
December 23, 2017 05:36
-
-
Save xenonstack1/e9d4387d2809738f026671ade9eeaaa2 to your computer and use it in GitHub Desktop.
This file contains 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 Xenonstack | |
# Installing PHP5 and Apache2 | |
RUN apt-get update \ | |
&& apt-get -y install apache2 php5 libapache2-mod-php5 php5-mcrypt php5-json curl git \ | |
&& apt-get clean \ | |
&& update-rc.d apache2 defaults \ | |
&& php5enmod mcrypt \ | |
&& rm -rf /var/www/html \ | |
&& rm -r /var/lib/apt/lists/* | |
# Installing Composer | |
RUN curl -sS https://getcomposer.org/installer | php \ | |
&& mv composer.phar /usr/local/bin/composer | |
# Adding Laravel configurations for apache2 | |
COPY laravel.conf /etc/apache2/sites-available/000-default.conf | |
# Setting Working Directory | |
WORKDIR /var/www | |
# Creating PHP laravel project | |
RUN composer create-project --prefer-dist laravel/laravel laravel \ | |
&& php laravel/artisan key:generate \ | |
&& chown www-data:www-data -R laravel/storage | |
# Expose Apache2 Port | |
EXPOSE 80 | |
# Persistent Data | |
VOLUME ["/var/www"] | |
# Starting Apache2 Web Server | |
CMD /usr/sbin/apache2ctl -D FOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment