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.
This commit is contained in:
Stefan Becker 2023-03-27 16:31:02 +03:00 committed by GitHub
parent cf40e4b299
commit 0db41e35ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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