[xen staging] automation: ensure created are not owned as root

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] automation: ensure created are not owned as root

patchbot
commit 5a5b8bfec3c4551fd78046274aa5a9b39083095d
Author:     Doug Goldstein <[hidden email]>
AuthorDate: Fri Aug 3 09:46:49 2018 -0500
Commit:     Wei Liu <[hidden email]>
CommitDate: Fri Aug 3 16:11:22 2018 +0100

    automation: ensure created are not owned as root
   
    By default the container runs as the root user and since the source tree
    is bind mounted into the container, any file is created and owned by the
    root user which harms ergonomics when working outside of the container
    environment. This maps the root user within the container to the uid of
    the user outside of the container so files are not owned by root.
   
    Signed-off-by: Doug Goldstein <[hidden email]>
    Reviewed-by: Wei Liu <[hidden email]>
---
 automation/scripts/containerize | 1 +
 1 file changed, 1 insertion(+)

diff --git a/automation/scripts/containerize b/automation/scripts/containerize
index 7bdfc2155d..bf9af589a8 100755
--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -70,6 +70,7 @@ fi
 # Kick off Docker
 einfo "*** Launching container ..."
 exec docker run \
+    -u $(id -u) \
     ${SSH_AUTH_SOCK:+-e SSH_AUTH_SOCK="/tmp/ssh-agent/${SSH_AUTH_NAME}"} \
     -v "${CONTAINER_PATH}":/build:rw \
     -v "${HOME}/.ssh":/root/.ssh:ro \
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog