33 lines
1.1 KiB
Docker
33 lines
1.1 KiB
Docker
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 gd \
|
|
&& pecl install imagick \
|
|
&& docker-php-ext-enable imagick pcntl imagick \
|
|
&& a2enmod rewrite \
|
|
&& 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
|
|
|
|
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
|
|
|
|
COPY . /var/www/
|
|
|
|
WORKDIR /var/www/
|
|
RUN find storage -name .gitignore -exec rm {} + \
|
|
&& chown -R www-data:www-data /var/www/storage
|
|
&& cp -r storage storage.skel \
|
|
&& cp docker/env .env \
|
|
&& composer install --prefer-source --no-interaction \
|
|
&& rm -rf html && ln -s public html
|
|
|
|
VOLUME ["/var/www/storage"]
|
|
|
|
CMD /var/www/docker/start.sh
|