@@ -10,8 +10,9 @@ RUN mkdir -p /var/log/nginx /var/www/certbot
|
||||
COPY nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY nginx/conf.d/ /etc/nginx/conf.d/
|
||||
|
||||
# 创建自签名证书(仅用于开发,生产环境应挂载真实证书)
|
||||
RUN apk add --no-cache openssl && \
|
||||
# 创建 SSL 目录并生成自签名证书(仅用于开发,生产环境应挂载真实证书)
|
||||
RUN mkdir -p /etc/nginx/ssl && \
|
||||
apk add --no-cache openssl && \
|
||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
||||
-keyout /etc/nginx/ssl/key.pem \
|
||||
-out /etc/nginx/ssl/cert.pem \
|
||||
|
||||
Reference in New Issue
Block a user