summaryrefslogtreecommitdiff
path: root/build-docker.sh
diff options
context:
space:
mode:
authorStefan Becker <stefanb2@users.noreply.github.com>2023-03-27 16:31:02 +0300
committerGitHub <noreply@github.com>2023-03-27 14:31:02 +0100
commit0db41e35efc3ebee7c334e11ae8d91607ef5931a (patch)
tree94199d6ff6b1d427146f7556b0f55eb9a1cf60b2 /build-docker.sh
parentcf40e4b299ca4023f842eed1ecc5b254eb3eb688 (diff)
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.
Diffstat (limited to 'build-docker.sh')
-rwxr-xr-xbuild-docker.sh3
1 files changed, 2 insertions, 1 deletions
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