Message ID | 20191004153235.10940-1-trini@konsulko.com |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
Series | [U-Boot,gitlab-ci-runner,1/2] Dockerfile: Switch to non-root user | expand |
On Fri, Oct 04, 2019 at 11:32:34AM -0400, Tom Rini wrote: > Add a 'uboot' user / group, allow them sudo access and make use of them > in the container. > > Signed-off-by: Tom Rini <trini@konsulko.com> Applied to u-boot/master, thanks!
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
Add a 'uboot' user / group, allow them sudo access and make use of them in the container. Signed-off-by: Tom Rini <trini@konsulko.com> --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+)