2018-06-09 11:52:13 +00:00
|
|
|
FROM php:7-apache
|
|
|
|
|
|
|
|
ARG COMPOSER_VERSION="1.6.5"
|
|
|
|
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --no-install-recommends libmagickwand-dev git \
|
|
|
|
&& docker-php-ext-install pdo_mysql pcntl \
|
|
|
|
&& pecl install imagick \
|
|
|
|
&& docker-php-ext-enable imagick pcntl imagick \
|
2018-06-09 15:45:57 +00:00
|
|
|
&& a2enmod rewrite \
|
2018-06-09 11:52:13 +00:00
|
|
|
&& curl -LsS https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar -o /tmp/composer.phar \
|
|
|
|
&& echo "${COMPOSER_CHECKSUM} /tmp/composer.phar" | sha256sum -c - \
|
|
|
|
&& install -m0755 -o root -g root /tmp/composer.phar /usr/bin/composer.phar \
|
|
|
|
&& ln -sf /usr/bin/composer.phar /usr/bin/composer \
|
|
|
|
&& rm /tmp/composer.phar
|
|
|
|
|
2018-06-09 13:18:44 +00:00
|
|
|
COPY . /var/www/
|
2018-06-09 11:52:13 +00:00
|
|
|
|
2018-06-09 13:18:44 +00:00
|
|
|
WORKDIR /var/www/
|
2018-06-09 11:52:13 +00:00
|
|
|
RUN install -d -m0755 -o www-data -g www-data \
|
2018-06-09 13:18:44 +00:00
|
|
|
/var/www/storage \
|
|
|
|
/var/www/storage/framework \
|
|
|
|
/var/www/storage/logs \
|
|
|
|
/var/www/storage/framework/sessions \
|
|
|
|
/var/www/storage/framework/views \
|
|
|
|
/var/www/storage/framework/cache \
|
|
|
|
&& composer install --prefer-source --no-interaction \
|
2018-06-09 15:41:26 +00:00
|
|
|
&& rm -rf html && ln -s public html
|
2018-06-09 11:52:13 +00:00
|
|
|
|
2018-06-09 13:18:44 +00:00
|
|
|
VOLUME ["/var/www/storage"]
|
2018-06-09 11:52:13 +00:00
|
|
|
|
|
|
|
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
|
2018-06-12 18:56:42 +00:00
|
|
|
|
|
|
|
CMD /var/www/docker/start.sh
|