playingapi commited on
Commit
216b2fd
·
verified ·
1 Parent(s): 30882cd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -0
Dockerfile CHANGED
@@ -73,7 +73,12 @@ COPY entrypoint.sh /entrypoint.sh
73
 
74
  RUN chmod +x /sync_data.sh /entrypoint.sh
75
 
 
 
 
76
 
 
 
77
 
78
  # 暴露端口 5000
79
  EXPOSE 5000
 
73
 
74
  RUN chmod +x /sync_data.sh /entrypoint.sh
75
 
76
+ # 创建非 root 用户
77
+ RUN useradd -m -u 1000 appuser && \
78
+ chown -R appuser:appuser /app
79
 
80
+ # 切换到非 root 用户
81
+ USER appuser
82
 
83
  # 暴露端口 5000
84
  EXPOSE 5000