FROM alpine:3.19
WORKDIR /var/www/html
COPY --chmod=550 start.sh /tmp/start.sh
RUN apk add \
sudo \
php83 \
php83-fpm \
php83-dom \
php83-xml \
php83-simplexml \
php83-mbstring \
php83-xsl \
pciutils \
openssh \
sshpass \
git && \
deluser www-data ; \
delgroup www-data ; \
addgroup -g 82 -S www-data && \
adduser -D -H -u 82 -s /bin/bash www-data -G www-data && \
sed -i '/user =/c user = www-data' /etc/php83/php-fpm.d/www.conf && \
sed -i '/group =/c group = www-data' /etc/php83/php-fpm.d/www.conf && \
sed -i '/listen = /c listen = 0.0.0.0:9000' /etc/php83/php-fpm.d/www.conf && \
ln -sf /usr/bin/php83 /usr/bin/php
CMD /tmp/start.sh