From 0db41e35efc3ebee7c334e11ae8d91607ef5931a Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Mon, 27 Mar 2023 16:31:02 +0300 Subject: [PATCH] Ensure that deploy is always owned by user (#680) Switch "docker cp" to tar streaming mode. As the receiving "tar" command is executed outside Docker the resulting directories & files are owned by the calling user. --- build-docker.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-docker.sh b/build-docker.sh index b3995d5..413c12a 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -126,8 +126,9 @@ else wait "$!" fi +# Ensure that deploy/ is always owned by calling user echo "copying results from deploy/" -${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy . +${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy - | tar -xf - ls -lah deploy # cleanup