SissiFeng commited on
Commit
bfc2e79
·
verified ·
1 Parent(s): 8f566f2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -1,5 +1,9 @@
1
  FROM python:3.11-slim
2
 
 
 
 
 
3
  WORKDIR /app
4
 
5
  COPY requirements.txt .
 
1
  FROM python:3.11-slim
2
 
3
+ # 创建一个虚拟用户 uid=1000,避免 getpass.getuser 报错
4
+ RUN adduser --disabled-password --gecos "" --uid 1000 appuser
5
+ USER appuser
6
+
7
  WORKDIR /app
8
 
9
  COPY requirements.txt .