瀏覽代碼

modified: Dockerfile

xf 1 年之前
父節點
當前提交
4d5fd2f0e0
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Dockerfile

+ 3 - 1
Dockerfile

@@ -2,4 +2,6 @@ FROM nginx:stable
 
 COPY nginx.conf /etc/nginx/nginx.conf
 
-COPY ./ /usr/share/nginx/html
+COPY ./ /usr/share/nginx/html
+
+CMD ["sh", "-c", "sed -i \"s@<html@<html data-env=\"$API_ENV\"@\" /usr/share/nginx/html/index.html; nginx -g \"daemon off;\""]