| ADD alpine-minirootfs-3.22.3-x86_64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| LABEL Maintainer=Christian Steinle <kontakt@steinle-computer.de> |
| LABEL Description=Lightweight container with Nginx & PHP 8.4 based on Alpine Linux. |
| WORKDIR /var/www/html |
| ENV SERVE_PATH= |
| RUN /bin/sh -c apk update && apk upgrade && apk add --no-cache curl nginx php84 php84-bcmath php84-ctype php84-curl php84-dom php84-fileinfo php84-fpm php84-gd php84-mbstring php84-mysqli php84-openssl php84-pdo php84-pdo_mysql php84-pdo_pgsql php84-pdo_sqlite php84-session php84-tokenizer php84-xml php84-xsl php84-zip supervisor # buildkit |
| RUN /bin/sh -c ln -s /usr/bin/php84 /usr/bin/php # buildkit |
| COPY config/nginx.conf /etc/nginx/nginx.conf # buildkit |
| COPY config/fpm-pool.conf /etc/php84/php-fpm.d/www.conf # buildkit |
| COPY config/php.ini /etc/php84/conf.d/custom.ini # buildkit |
| COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # buildkit |
| COPY config/entrypoint.sh /bin/entrypoint.sh # buildkit |
| RUN /bin/sh -c chmod a+x /bin/entrypoint.sh # buildkit |
| EXPOSE [8080/tcp] |
| RUN /bin/sh -c chown -R nobody:nobody /var/www/html /run /var/lib/nginx /var/log/nginx /etc/nginx # buildkit |
| ENTRYPOINT ["/bin/entrypoint.sh"] |
| USER nobody |
| HEALTHCHECK &{["CMD-SHELL" "curl --silent --fail http://127.0.0.1:8080/fpm-ping"] "0s" "10s" "0s" "0s" '\x00'} |
| WORKDIR /var/www/html |
| USER root |
| COPY /var/www/html /var/www/html # buildkit |
| RUN /bin/sh -c sed -ri -e 's!upload_max_filesize = 2M!upload_max_filesize = 8M!g' /etc/php84/conf.d/custom.ini # buildkit |
| USER nobody |