fanqiNO1 commited on
Commit
937afa8
·
1 Parent(s): 791096c
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -40,9 +40,6 @@ COPY --chown=user public/reports ./public/reports
40
  # 创建配置目录
41
  RUN mkdir -p /app/config && chown user:user /app/config
42
 
43
- # 切换到非root用户
44
- USER user
45
-
46
  # 设置环境变量
47
  ENV NODE_ENV=production
48
  ENV NEXT_PUBLIC_API_URL=/api
@@ -56,5 +53,8 @@ RUN echo '#!/bin/bash\n\
56
  python backend/api.py &\n\
57
  pnpm start -p 7860' > /app/start.sh && chmod +x /app/start.sh
58
 
 
 
 
59
  # 启动应用
60
  CMD ["/app/start.sh"]
 
40
  # 创建配置目录
41
  RUN mkdir -p /app/config && chown user:user /app/config
42
 
 
 
 
43
  # 设置环境变量
44
  ENV NODE_ENV=production
45
  ENV NEXT_PUBLIC_API_URL=/api
 
53
  python backend/api.py &\n\
54
  pnpm start -p 7860' > /app/start.sh && chmod +x /app/start.sh
55
 
56
+ # 切换到非root用户
57
+ USER user
58
+
59
  # 启动应用
60
  CMD ["/app/start.sh"]