forked from oscarolbe/docker-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (33 loc) · 1.55 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Docker file to Laravel Docker
FROM php:5.6-apache
MAINTAINER Jon Dotsoy <[email protected]> (http://jon.soy/)
# Get Composer
RUN echo "Install Composer" && cd /bin && php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/bin --filename=composer
# RUN cd /bin && ls -la | grep composer
# Install Git
RUN echo "Update (apt-get)" && apt-get update
RUN echo "Install Git" && apt-get install git -y
# Install Laravel Installer
# RUN echo "Install Laravel" && composer global require "laravel/installer=~1.1"
# Zip dependences
RUN echo "Zip Archive" && apt-get install -y zlib1g-dev && docker-php-ext-install zip
RUN echo "mbstring bcmath" && docker-php-ext-install bcmath mbstring
RUN echo "Libmcrypt-dev" && apt-get install -y libmcrypt-dev
RUN echo "mcrypt" && docker-php-ext-install mcrypt
RUN apt-get install -y libxml2-dev php-soap
RUN echo "Soap" && docker-php-ext-install soap
RUN echo "Calendar" && docker-php-ext-configure calendar
RUN docker-php-ext-install calendar
RUN echo "mysql" && docker-php-ext-install mysql mysqli pdo pdo_mysql
# Add Bin Composer in PATH
ENV PATH ${PATH}:~/.composer/vendor/bin
# RUN laravel DemoProject
# ~/.composer/vendor/bin/laravel new html -n
RUN echo "New Demo project" && cd /var/www && rm -r /var/www/html && composer create-project laravel/laravel /var/www/html "4.2.11" --prefer-dist
WORKDIR /var/www/html/public
RUN chmod -R 777 /var/www/html/app/storage
# Enable htaccess
RUN a2enmod rewrite
ADD 000-default.conf /etc/apache2/sites-available/000-default.conf
ADD apache2.conf /etc/apache2/apache2.conf
EXPOSE 80