添加docker 部署agent
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
FROM php:8.1-apache
|
||||
|
||||
# 切换为阿里云 Debian 镜像源(加速国内构建)
|
||||
RUN sed -i 's|http://deb.debian.org|https://mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \
|
||||
sed -i 's|http://deb.debian.org|https://mirrors.aliyun.com|g' /etc/apt/sources.list
|
||||
|
||||
# 安装 PHP 扩展(包含 Redis)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libzip-dev \
|
||||
@@ -26,6 +30,9 @@ RUN sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/Allo
|
||||
# 设置时区
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
# 关闭 PHP 错误输出到响应体,开启输出缓冲(与 Windows 行为一致)
|
||||
RUN echo 'display_errors = Off\nerror_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT\noutput_buffering = 4096\nlog_errors = On\nerror_log = /var/log/apache2/php_errors.log' > /usr/local/etc/php/conf.d/production.ini
|
||||
|
||||
# 拷贝应用代码
|
||||
COPY dlweb/ /var/www/html/
|
||||
COPY env_config.php /var/www/env_config.php
|
||||
|
||||
Reference in New Issue
Block a user