Update PHP test app - 2026-01-21 13:37:13

This commit is contained in:
K3s Admin
2026-01-21 13:37:13 +00:00
parent 33f803c82f
commit b93f156e19
14 changed files with 1026 additions and 0 deletions

23
php-test/Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM php:8.2-apache
# 安装 PDO MySQL 扩展
RUN docker-php-ext-install pdo pdo_mysql
# 启用 Apache mod_rewrite
RUN a2enmod rewrite
# 复制项目文件到容器
COPY . /var/www/html/
# 设置工作目录
WORKDIR /var/www/html
# 设置文件权限
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
# 暴露80端口
EXPOSE 80
# 启动Apache
CMD ["apache2-foreground"]