Dockerfile 382 B

123456789
  1. FROM nginx:1.17.0
  2. MAINTAINER zuihou 244387066@qq.com
  3. COPY nginx.template /etc/nginx/conf.d/nginx.template
  4. COPY zuihou-ui/ /etc/nginx/html
  5. # 通过 envsubst 命令替换 nginx.template 模板中的变量,并覆盖/etc/nginx/nginx.conf
  6. CMD envsubst '$NGINX_HOST $DOCKER_REQUEST_DOMAIN_PREFIX' < /etc/nginx/conf.d/nginx.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'