Chg: Line Break & Fix: many fixes & Chg: README

This commit is contained in:
2025-10-31 19:04:16 +09:00
parent 0e6df50a7f
commit 283df57c20
10 changed files with 171 additions and 105 deletions
+57 -15
View File
@@ -1,16 +1,58 @@
FROM php:8.2-apache
# Load php-apache
FROM php:8.2-apache
# Set working directory
WORKDIR /var/www/html
# Install packages(apt)
RUN apt-get update
RUN apt-get install -y libpng-dev
RUN apt-get install -y libjpeg62-turbo-dev
RUN apt-get install -y libfreetype6-dev
RUN apt-get install -y libonig-dev
RUN apt-get install -y libzip-dev
RUN apt-get install -y libcurl4-openssl-dev
RUN apt-get install -y zip
RUN apt-get install -y unzip
RUN apt-get install -y curl
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
# Copy uwuzu
COPY src /usr/src/app
# Install packages(php)
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install mbstring
RUN docker-php-ext-install zip
RUN docker-php-ext-install fileinfo
RUN docker-php-ext-install curl
# Enable Apache modules
RUN a2enmod rewrite
RUN a2enmod headers
# Copy custom configuration
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
# 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"]
RUN apt-get update
RUN apt-get install -y \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libonig-dev \
libzip-dev \
zip \
unzip
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd pdo_mysql mysqli mbstring zip fileinfo
RUN a2enmod rewrite headers
COPY apache2.conf /etc/apache2/conf-enabled/99-custom.conf