Fix: sql-mode / Many fixes

This commit is contained in:
2025-12-10 19:19:14 +09:00
parent b92874f2d9
commit 13e86f2ee2
5 changed files with 16 additions and 40 deletions
+13 -18
View File
@@ -4,6 +4,9 @@ FROM php:8.2-apache
# Set working directory
WORKDIR /var/www/html
# Run as root
USER root
# Install packages(apt)
RUN apt-get update
RUN apt-get install -y dos2unix
@@ -20,11 +23,11 @@ RUN apt-get install -y curl
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
# Copy uwuzu
COPY src /usr/src/app
RUN find /usr/src/app/ -type f -exec dos2unix {} \;
# Copy app
COPY src/ /var/www/html/
RUN find /var/www/html -type f -exec dos2unix {} \;
# Install packages(php)
# Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype --with-webp
RUN docker-php-ext-install gd
RUN docker-php-ext-install pdo_mysql
@@ -43,18 +46,10 @@ COPY php/php.ini /usr/local/etc/php/conf.d/99-custom.ini
COPY php/apache2.conf /etc/apache2/conf-enabled/99-custom.conf
# Set permissions
USER root
RUN chown -R www-data:www-data /usr/src/app
RUN find /usr/src/app -type d -exec chmod 775 {} \;
RUN find /usr/src/app -type f -exec chmod 664 {} \;
RUN chmod 777 /usr/src/app
RUN chown -R www-data:www-data /var/www/html
RUN find /var/www/html -type d -exec chmod 775 {} \;
RUN find /var/www/html -type f -exec chmod 664 {} \;
RUN chmod 777 /var/www/html
# Copy entrypoint
COPY php/entrypoint.sh /usr/src/entrypoint.sh
RUN chmod +x /usr/src/entrypoint.sh
# Run as www-data
USER www-data
# Exec entrypoint
ENTRYPOINT ["/usr/src/entrypoint.sh"]
# Start Apache
CMD ["apache2-foreground"]