[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v2 08/57] docker: allow "cc" command to run in user c

From: Alex Bennée
Subject: [Qemu-devel] [PULL v2 08/57] docker: allow "cc" command to run in user context
Date: Thu, 21 Jun 2018 07:25:16 +0100

Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index db1e2537f5..b28ad87034 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -421,6 +421,8 @@ class CcCommand(SubCommand):
                             help="The docker image in which to run cc")
         parser.add_argument("--cc", default="cc",
                             help="The compiler executable to call")
+        parser.add_argument("--user",
+                            help="The user-id to run under")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container 
                             reading sources""")
@@ -434,6 +436,8 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
+        if args.user:
+            cmd += ["-u", args.user]
         cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]