From: Tom Rini Date: Fri, 4 Oct 2019 11:32:34 -0400 Subject: [U-Boot] [gitlab-ci-runner][PATCH 1/2] Dockerfile: Switch to non-root user Message-ID: <20191004153235.10940-1-trini@konsulko.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add a 'uboot' user / group, allow them sudo access and make use of them in the container. Signed-off-by: Tom Rini --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1d7a3dae39d0..c7b35026a171 100644 --- a/Dockerfile +++ b/Dockerfile @@ -136,6 +136,11 @@ RUN git clone git://git.qemu.org/qemu.git /tmp/qemu && \ make -j$(nproc) all install && \ rm -rf /tmp/qemu +# Create our user/group +RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot +RUN useradd -m -U uboot +USER uboot:uboot + # Create the buildman config file RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman RUN /bin/echo -e "kernelorg = /opt/gcc-7.3.0-nolibc/*" >> ~/.buildman -- 2.17.1