fix: add user directly into sudoers file

This commit is contained in:
Ahmad Husen
2022-02-01 23:56:42 +07:00
parent 6443f058c1
commit 360be955b0
5 changed files with 34 additions and 24 deletions
+4 -5
View File
@@ -5,11 +5,10 @@ FROM docker.io/library/archlinux:base-devel
RUN pacman -Syu --needed --noconfirm pacman-contrib namcap git
# Setup user
RUN useradd --create-home --shell /bin/bash builder && \
passwd --delete builder && \
chown -vR builder:builder /home/builder && \
usermod -aG wheel builder && \
echo 'wheel ALL=(ALL:ALL) ALL' >> /etc/sudoers
RUN useradd -m builder && \
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
WORKDIR /home/builder
USER builder
# Copy files
COPY LICENSE README.md /