1
This commit is contained in:
Anfioo
2025-12-18 17:26:30 +08:00
parent eaecd96ae6
commit 0781a43fc8
2 changed files with 6 additions and 1 deletions

View File

@@ -2,6 +2,12 @@ FROM nginx:alpine
MAINTAINER anfioo
# 1. 创建 Nginx 日志目录(避免启动时日志文件不存在报错)
RUN mkdir -p /var/log/nginx \
&& touch /var/log/nginx/access.log \
&& touch /var/log/nginx/error.log
# 把当前目录下的 nginx.conf 复制到容器的 Nginx 配置目录
COPY nginx.conf /etc/nginx/conf.d/default.conf