-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (36 loc) · 1.65 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
FROM php:7.1-apache
RUN apt-get update && apt-get install -y libmcrypt-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libpq-dev \
ghostscript \
libmagickwand-dev --no-install-recommends && \
pecl install imagick && \
docker-php-ext-enable imagick && \
docker-php-ext-install mcrypt pdo pdo_pgsql mbstring exif && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ &&\
docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql &&\
docker-php-ext-install gd
ENV DOCKERIZE_VERSION v0.6.1
RUN curl --silent --location \
--url https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
--output /tmp/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm /tmp/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
RUN apt-get update && \
apt-get install -y git zip unzip && \
php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && \
apt-get -y autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN composer global require "laravel/framework:5.6.*"
COPY docker-apache2-laravel.conf /etc/apache2/sites-available/laravel.conf
RUN a2dissite 000-default.conf && a2ensite laravel.conf && a2enmod rewrite
WORKDIR /var/www/html
COPY . .
RUN composer install
RUN chown www-data -R storage
RUN chown www-data -R themes
COPY entrypoint.sh /usr/local/bin/docker-php-entrypoint
CMD [ "/usr/local/bin/apache2-foreground" ]