2020-01-08 16:51:53 +00:00
|
|
|
FROM php:7.2-fpm-alpine
|
2018-05-18 02:53:17 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2020-01-08 16:51:53 +00:00
|
|
|
RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip; \
|
|
|
|
docker-php-ext-install bcmath; \
|
|
|
|
apk add --no-cache libpng-dev; \
|
|
|
|
docker-php-ext-install gd; \
|
|
|
|
docker-php-ext-install mbstring; \
|
|
|
|
docker-php-ext-install pdo; \
|
|
|
|
docker-php-ext-install pdo_mysql; \
|
|
|
|
docker-php-ext-install tokenizer; \
|
|
|
|
apk add --no-cache libxml2-dev; \
|
|
|
|
docker-php-ext-install xml; \
|
|
|
|
docker-php-ext-install zip; \
|
|
|
|
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
2018-05-18 02:53:17 +00:00
|
|
|
|
|
|
|
COPY . ./
|
|
|
|
|
2018-09-16 01:22:13 +00:00
|
|
|
RUN cp .env.example .env \
|
|
|
|
&& composer install --no-dev --optimize-autoloader \
|
|
|
|
&& rm .env \
|
|
|
|
&& chown -R nginx:nginx . && chmod -R 777 storage/* bootstrap/cache
|
|
|
|
|
2018-07-18 19:31:35 +00:00
|
|
|
RUN cp .dev/docker/default.conf /etc/nginx/conf.d/default.conf \
|
|
|
|
&& cp .dev/docker/www.conf /etc/php7/php-fpm.d/www.conf \
|
2018-09-16 01:22:13 +00:00
|
|
|
&& cat .dev/docker/supervisord.conf > /etc/supervisord.conf \
|
2018-11-10 23:57:49 +00:00
|
|
|
&& echo "* * * * * /usr/bin/php /app/artisan schedule:run >> /dev/null 2>&1" >> /var/spool/cron/crontabs/root \
|
|
|
|
&& sed -i s/ssl_session_cache/#ssl_session_cache/g /etc/nginx/nginx.conf \
|
|
|
|
&& mkdir -p /var/run/php /var/run/nginx
|
2018-05-18 02:53:17 +00:00
|
|
|
|
2018-07-08 15:14:20 +00:00
|
|
|
EXPOSE 80 443
|
2018-05-18 02:53:17 +00:00
|
|
|
|
2018-09-16 01:22:13 +00:00
|
|
|
ENTRYPOINT ["/bin/ash", ".dev/docker/entrypoint.sh"]
|
2018-05-18 02:53:17 +00:00
|
|
|
|
2020-01-08 16:51:53 +00:00
|
|
|
CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ]
|