adds development versions

This commit is contained in:
soneill 2021-09-05 13:27:54 +12:00
parent 790407f552
commit 36f977d0b3
13 changed files with 223 additions and 483 deletions

View file

@ -1,5 +1,5 @@
FROM php:7.2.5-fpm-alpine3.7 as build
#FROM php:7.4.4-fpm-alpine3.11 as build
RUN apk update \
&& apk add --no-cache libpng-dev zeromq-dev git \
$PHPIZE_DEPS \
@ -9,27 +9,17 @@ RUN apk update \
COPY pathfinder /app
WORKDIR /app
RUN composer self-update 1.6.3
RUN composer install
#FROM trafex/alpine-nginx-php7:latest
FROM trafex/alpine-nginx-php7:ba1dd422
#USER root
RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo shadow gettext bash apache2-utils
#RUN usermod -u 1000 nobody
#RUN groupmod -g 1000 nobody
COPY static/nginx/nginx.conf /etc/nginx/templateNginx.conf
COPY static/nginx/site.conf /etc/nginx/sites_enabled/templateSite.conf
# Configure PHP-FPM
COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf
#COPY static/php/php.ini /etc/php7/conf.d/zzz_custom.ini
# DEBUG
RUN apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/
COPY static/php/xdebug.ini /etc/php7/conf.d/xdebug.ini
COPY static/php/error_reporting.ini /etc/php7/conf.d/error_reporting.ini
RUN echo "zend_extension=/usr/lib/php7/modules/xdebug.so" >> /etc/php7/php.ini
COPY static/php/php.ini /etc/zzz_custom.ini
# configure cron
@ -37,17 +27,16 @@ COPY static/crontab.txt /var/crontab.txt
# Configure supervisord
COPY static/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY static/entrypoint.sh /
#RUN apk add sudo php7-redis php7-pdo php7-pdo_mysql
WORKDIR /var/www/html
COPY --chown=nobody --from=build /app pathfinder
##RUN chown -R nobody:nobody /var/www/html/pathfinder
RUN chmod 0766 pathfinder/logs pathfinder/tmp/ && rm index.php && touch /etc/nginx/.setup_pass && chmod +x /entrypoint.sh
COPY static/pathfinder/routes.ini /var/www/html/pathfinder/app/
COPY static/pathfinder/environment.ini /var/www/html/pathfinder/app/templateEnvironment.ini
#USER nobody
WORKDIR /var/www/html
EXPOSE 80
#ENTRYPOINT ["sh", "-c", "source /.env && /entrypoint.sh", "-s"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]