ok
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
@@ -35,8 +35,11 @@ RUN npm install
|
|
35 |
# 复制其余的源代码和公共文件
|
36 |
COPY . .
|
37 |
|
38 |
-
#
|
39 |
-
RUN
|
|
|
|
|
|
|
40 |
&& echo 'user:password' | chpasswd
|
41 |
|
42 |
# 设置 Dropbear
|
|
|
35 |
# 复制其余的源代码和公共文件
|
36 |
COPY . .
|
37 |
|
38 |
+
# 检查 UID 1000 是否存在,如果存在则删除,然后创建新用户
|
39 |
+
RUN if id 1000 >/dev/null 2>&1; then \
|
40 |
+
userdel -f $(id -nu 1000); \
|
41 |
+
fi \
|
42 |
+
&& useradd -u 1000 -m -s /bin/bash user \
|
43 |
&& echo 'user:password' | chpasswd
|
44 |
|
45 |
# 设置 Dropbear
|