v2borad-master/Dockerfile

25 lines
839 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM php:7.4-fpm
WORKDIR /var/www/html
COPY ./app/ /var/www/html/
RUN apt-get update && apt-get install -y \
nginx libzip-dev zip unzip git curl bash supervisor cron \
&& docker-php-ext-install pdo_mysql mysqli bcmath zip fileinfo pcntl \
&& pecl install redis \ && docker-php-ext-enable redis \
&& rm -rf /var/lib/apt/lists/*
COPY ./data/nginx.conf /etc/nginx/conf.d/default.conf
COPY ./data/supervisor.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./data/cron.d/schedule /etc/cron.d/schedule
COPY ./data/php/www.conf /usr/local/etc/php-fpm.d/www.conf
# 启动脚本执行初始化再启动php-fpm
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 777 storage bootstrap/cache \
&& chmod +x /var/www/html/init.sh && chmod 644 /etc/cron.d/schedule
EXPOSE 8045
ENTRYPOINT ["sh", "-c", "supervisord -n"]