FROM composer AS vendor WORKDIR /app COPY composer.json . RUN composer install --ignore-platform-reqs --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader FROM alpine:3.16 WORKDIR /var/www/html RUN apk add --no-cache \ php8 \ php8-fpm \ php8-mbstring \ php8-pdo_mysql \ php8-exif \ php8-pcntl \ php8-bcmath \ php8-gd \ php8-soap \ php8-zip \ php8-sockets \ php8-session \ php8-fileinfo && \ addgroup -g 82 -S www-data || true && \ adduser -u 82 -D -S -G www-data www-data || true && \ sed -i '/listen = /c listen = 0.0.0.0:9000' /etc/php8/php-fpm.d/www.conf && \ chown -R 82: /var/log/php* #sed -i '/user =/c user = www-data' /etc/php8/php-fpm.d/www.conf && \ #sed -i '/group =/c group = www-data' /etc/php8/php-fpm.d/www.conf && \ #sed -i '/php_admin_value\[memory_limit\] = /c php_admin_value[memory_limit] = 512M' /etc/php8/php-fpm.d/www.conf && \ #sed -i '/memory_limit = /c memory_limit = 512M' /etc/php8/php.ini && \ #sed -i 's/;clear_env/clear_env/' /etc/php8/php-fpm.d/www.conf && \ #sed -i 's/^;env/env/' /etc/php8/php-fpm.d/www.conf COPY --chown=82:82 --from=vendor /app/vendor ./vendor COPY --chown=82:82 . . EXPOSE 9000 #websockets #EXPOSE 6001 USER 82 #RUN php artisan key:generate CMD ["php-fpm8", "-F"]