From 9249e146d2e3987adf2ea0e5e19e295d37f3f886 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Mon, 3 Apr 2023 12:08:50 +0300 Subject: [PATCH] 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. --- build-docker.sh | 4 ++++ 1 file changed, 4 insertions(+) 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