# 推荐使用最新版,漏洞会较少,通过漏洞扫描的几率较大 #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