From 0ac159e3373c6967619d87279a5fc3a9c4270b91 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Thu, 14 Sep 2023 14:06:25 -0500 Subject: [PATCH] Try capturing lengthy output *inside* the container --- build-image.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-image.sh b/build-image.sh index b49b024..dba5c02 100755 --- a/build-image.sh +++ b/build-image.sh @@ -15,8 +15,10 @@ composer-cli() { # Start the container. echo "🚀 Launching the container" +mkdir -vp shared output sudo podman run --rm --detach --privileged \ -v $(pwd)/shared:/repo \ + -v $(pwd)/output:/output \ --name $CONTAINER_NAME \ $CONTAINER @@ -54,11 +56,9 @@ sleep 10 COUNTER=0 while true; do - composer-cli --json compose info "${COMPOSE_ID}" | tee compose_info.json >/dev/null + composer-cli "--json compose info \"${COMPOSE_ID}\" | tee /output/compose_info.json >/dev/null" - # Sometimes tee isn't done writing by the time we check the status line below. 🐌 - sleep 2 - COMPOSE_STATUS=$(jq -r ".[].body.queue_status" compose_info.json) + COMPOSE_STATUS=$(jq -r ".[].body.queue_status" output/compose_info.json) # Print a status line once per minute. if [ $((COUNTER % 60)) -eq 0 ]; then