FROM php:8.1-apache RUN a2enmod rewrite ARG PHP_VERSION="8.1" ENV PHP_VERSION $PHP_VERSION RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get -y upgrade \ && apt-get --no-install-recommends -yq install supervisor libicu-dev \ libwebp-dev \ libjpeg62-turbo-dev \ libpng-dev libzip-dev libxpm-dev \ libfreetype6-dev \ vim wget git \ apache2 RUN docker-php-ext-install pdo pdo_mysql zip \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-install gd \ && docker-php-ext-configure intl \ && docker-php-ext-install intl RUN wget https://getcomposer.org/download/2.0.9/composer.phar \ && mv composer.phar /usr/bin/composer && chmod +x /usr/bin/composer RUN wget -O- https://deb.nodesource.com/setup_18.x | bash - \ && apt-get install -y nodejs \ && npm install --global yarn COPY apache.conf /etc/apache2/sites-enabled/000-default.conf WORKDIR /var/www RUN wget -O- https://github.com/boxboat/fixuid/releases/download/v0.5.1/fixuid-0.5.1-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - \ && chown root:root /usr/local/bin/fixuid \ && chmod 4755 /usr/local/bin/fixuid \ && mkdir -p /etc/fixuid COPY fixuid.yaml /etc/fixuid/config.yaml COPY supervisor.ini /etc/supervisor/supervisor.ini RUN chmod +x /etc/supervisor/supervisor.ini RUN chown www-data:www-data /etc/supervisor/supervisor.ini COPY init.sh /init.sh RUN chmod +x /init.sh RUN chown www-data:www-data /init.sh ENTRYPOINT ["/usr/local/bin/fixuid"] USER www-data CMD ["/init.sh"]