| ADD alpine-minirootfs-3.21.6-x86_64.tar.gz / # buildkit |
| CMD ["/bin/sh"] |
| LABEL Maintainer=Christian Steinle <kontakt@steinle-computer.de> |
| LABEL Description=Lightweight container with Nginx 1.22 & PHP 8.2 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 php82 php82-bcmath php82-ctype php82-curl php82-dom php82-fileinfo php82-fpm php82-gd php82-mbstring php82-mysqli php82-openssl php82-pdo php82-pdo_mysql php82-pdo_pgsql php82-pdo_sqlite php82-session php82-tokenizer php82-xml php82-xsl php82-zip supervisor # buildkit |
| RUN /bin/sh -c ln -s /usr/bin/php82 /usr/bin/php # buildkit |
| COPY config/nginx.conf /etc/nginx/nginx.conf # buildkit |
| COPY config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf # buildkit |
| COPY config/php.ini /etc/php82/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'} |