From patchwork Fri Oct 4 15:32:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1171904 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=konsulko.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46lDR45hvcz9sPd for ; Sat, 5 Oct 2019 01:33:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5FD06C21F1A; Fri, 4 Oct 2019 15:32:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1C47BC21DEC; Fri, 4 Oct 2019 15:32:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B7D93C21DEC; Fri, 4 Oct 2019 15:32:41 +0000 (UTC) Received: from mail-yw1-f68.google.com (mail-yw1-f68.google.com [209.85.161.68]) by lists.denx.de (Postfix) with ESMTPS id 2F820C21D4A for ; Fri, 4 Oct 2019 15:32:41 +0000 (UTC) Received: by mail-yw1-f68.google.com with SMTP id 129so2460384ywb.8 for ; Fri, 04 Oct 2019 08:32:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Q7YDBZiu4gyMD6vudm9VpRZlnE6F809VUuXwLCG8TUY=; b=jdNiJT/J6uxYDVHXN9FKGsDsotXU8UYuCyFjF+ywXEFsD9Kbyacko+PR3UWo8j08+u mrY8c0MB96eK09RO132YTkQoKwRf3qbi6offr7ngiX2M8K8txPHGXu+U3A89sjV6Eq3m dVoL4NUO49hJH6orEi3RpFajL6eYQ4G7A5FrcQalaFZhsdfqDWaqzqiEGmVFr3abO5WX ny4R0G0rtAMPnIoMF0cYA2B4/4gFSiUIvtd5Q33xwExq9Wsysni8urMA53Sm6B8FlZdH PgmIYWyxqEdkaieWbyoDAVSvYTNgayVx7nX8ijgzQ3hWiIlIaegPQ9fWUlYHwy6wLxjS ORFA== X-Gm-Message-State: APjAAAX4uor2Pqy3S7DLlB59L3I6I1bIM3YzABFHYGYPmMidmakN3eEQ 6aW8rru4flgqF6fxsoVimcWn2bs= X-Google-Smtp-Source: APXvYqxBYVwGxOljQ3S4I6D+k8wCM986exmnw7LmxTaZxlo3KxBKDkPdSTs8/3Ll8E0SLimxIG5IOg== X-Received: by 2002:a81:3583:: with SMTP id c125mr10346156ywa.278.1570203159283; Fri, 04 Oct 2019 08:32:39 -0700 (PDT) Received: from bill-the-cat.local (cpe-65-184-142-8.ec.res.rr.com. [65.184.142.8]) by smtp.gmail.com with ESMTPSA id 189sm1529769ywa.47.2019.10.04.08.32.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2019 08:32:38 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 4 Oct 2019 11:32:34 -0400 Message-Id: <20191004153235.10940-1-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 Subject: [U-Boot] [gitlab-ci-runner][PATCH 1/2] Dockerfile: Switch to non-root user X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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