coteerratu commited on
Commit
1c9c3dc
·
verified ·
1 Parent(s): d6a8f33

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -1
Dockerfile CHANGED
@@ -21,7 +21,8 @@ RUN wget -O gotty.tar.gz https://github.com/yudai/gotty/releases/download/v1.0.1
21
 
22
  # 创建用户 1001 并设置工作目录
23
  RUN useradd -u 1001 -d /data user1001 \
24
- && echo 'user1001 ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/user1001
 
25
 
26
  # 切换到用户 1001 并设置工作目录
27
  USER 1001
 
21
 
22
  # 创建用户 1001 并设置工作目录
23
  RUN useradd -u 1001 -d /data user1001 \
24
+ && echo 'user1001 ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/user1001 \
25
+ && chmod 0440 /etc/sudoers.d/user1001
26
 
27
  # 切换到用户 1001 并设置工作目录
28
  USER 1001