fix: 优化Dockerfile,简化用户添加步骤,移除不必要的groupadd和useradd命令
This commit is contained in:
@@ -24,9 +24,7 @@ RUN apt-get update \
|
||||
&& apt-get install -y python2 python-mako python-is-python2 python-enum34 gettext
|
||||
|
||||
|
||||
RUN groupadd -g $groupid $username \
|
||||
&& useradd -m -u $userid -g $groupid $username \
|
||||
&& echo "$username ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
|
||||
RUN echo "$username ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
|
||||
&& echo $username >/root/username \
|
||||
&& echo "$username:$username" | chpasswd && adduser $username sudo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user