Files
Kubernetes/Docker/Dockerfile/Nginx/Dockerfile
offends 89a07bc062
All checks were successful
continuous-integration/drone Build is passing
first commit
2025-12-20 21:10:05 +08:00

16 lines
457 B
Docker

# 推荐使用最新版,漏洞会较少,通过漏洞扫描的几率较大
#FROM nginx:latest
FROM nginx:alpine
# 初始化 NGINX 配置文件
ENV NGINX_ENVSUBST_TEMPLATE_DIR=/etc/nginx/templates \
NGINX_ENVSUBST_TEMPLATE_SUFFIX=.template \
NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
COPY ./templates/*.template /etc/nginx/templates/
COPY ./nginx.conf /etc/nginx/nginx.conf
# 自定义初始化变量
ENV NGINX_PORT=80 \
NGINX_HOST=localhost