summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Becker <stefanb2@users.noreply.github.com>2023-04-03 12:08:50 +0300
committerGitHub <noreply@github.com>2023-04-03 10:08:50 +0100
commit9249e146d2e3987adf2ea0e5e19e295d37f3f886 (patch)
treef29160e1466fc6e355a95ad3ae6026046c29fc0d
parent6dc45a80e764eacd6e311c32164b623bbe7f8e08 (diff)
Copy container log to deploy (#688)
The container log is much more detailed than the default build.log, which makes life much easier for a build maintainer. Before deleting the container copy the log out to the deploy/ directory.
-rwxr-xr-xbuild-docker.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/build-docker.sh b/build-docker.sh
index 5495dfa..7d0b5ad 100755
--- a/build-docker.sh
+++ b/build-docker.sh
@@ -166,6 +166,10 @@ time ${DOCKER} run \
# Ensure that deploy/ is always owned by calling user
echo "copying results from deploy/"
${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy - | tar -xf -
+
+echo "copying log from container ${CONTAINER_NAME} to depoy/"
+${DOCKER} logs --timestamps "${CONTAINER_NAME}" &>deploy/build-docker.log
+
ls -lah deploy
# cleanup