| ADD file:1f4eb46669b5b6275af19eb7471a6899a61c276aa7d925b8ae99310b14b75b92 in / |
| CMD ["/bin/sh"] |
| LABEL Maintainer=Tim de Pater <code@trafex.nl> |
| LABEL Description=Lightweight container with Nginx 1.24 & PHP 8.3 based on Alpine Linux. |
| WORKDIR /var/www/html |
| RUN /bin/sh -c apk add --no-cache curl nginx php83 php83-ctype php83-curl php83-dom php83-fileinfo php83-fpm php83-gd php83-intl php83-mbstring php83-mysqli php83-opcache php83-openssl php83-phar php83-session php83-tokenizer php83-xml php83-xmlreader php83-xmlwriter supervisor # buildkit |
| COPY config/nginx.conf /etc/nginx/nginx.conf # buildkit |
| COPY config/conf.d /etc/nginx/conf.d/ # buildkit |
| ENV PHP_INI_DIR=/etc/php83 |
| COPY config/fpm-pool.conf /etc/php83/php-fpm.d/www.conf # buildkit |
| COPY config/php.ini /etc/php83/conf.d/custom.ini # buildkit |
| COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # buildkit |
| RUN /bin/sh -c chown -R nobody.nobody /var/www/html /run /var/lib/nginx /var/log/nginx # buildkit |
| RUN /bin/sh -c ln -s /usr/bin/php83 /usr/bin/php # buildkit |
| USER nobody |
| COPY src/ /var/www/html/ # buildkit |
| EXPOSE map[8080/tcp:{}] |
| CMD ["/usr/bin/supervisord" "-c" "/etc/supervisor/conf.d/supervisord.conf"] |
| HEALTHCHECK &{["CMD-SHELL" "curl --silent --fail http://127.0.0.1:8080/fpm-ping"] "0s" "10s" "0s" "0s" '\x00'} |
| WORKDIR /var/www/html |
| COPY . /var/www/html # buildkit |
| COPY k8s/nginx_config.conf /etc/nginx/nginx.conf # buildkit |
| COPY k8s/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # buildkit |
| USER root |
| RUN /bin/sh -c rm -rf /etc/nginx/conf.d/default.conf # buildkit |
| RUN /bin/sh -c echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories # buildkit |
| RUN /bin/sh -c echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories # buildkit |
| RUN /bin/sh -c apk add --no-cache libssl3 libcrypto3 openssl-dev php83-dom php83-session php83-fileinfo php83-pdo php83-pdo_mysql php83-tokenizer php83-xml php83-xmlwriter php83-simplexml php83-iconv php83-mbstring perl-utils libxml2 libc6-compat gcompat # buildkit |
| RUN /bin/sh -c mkdir /.composer && chown -R nobody /.composer && chown -R nobody /var/www/html # buildkit |
| RUN /bin/sh -c mkdir /var/log/laravel-websockets && chown -R nobody /var/log/laravel-websockets # buildkit |
| USER nobody |
| RUN /bin/sh -c sh k8s/get_composer.sh # buildkit |
| RUN /bin/sh -c ./composer.phar install --optimize-autoloader --no-interaction --no-progress # buildkit |
| RUN /bin/sh -c php artisan key:generate # buildkit |