Skip to content

Commit

Permalink
wkdev-enter: Show container log, while waiting for initialization
Browse files Browse the repository at this point in the history
Show an excerpt from the container log after waiting for N seconds to
try to enter the container.

This helps the user to indicate progress, when entering a freshly
created container for the first time (when wkdev-init is running for the
first time). At the same time, no output is shown upon successive
wkdev-enter commands, since the container is already initialized, and
entering it is fast by definition.
  • Loading branch information
nikolaszimmermann committed Sep 27, 2024
1 parent 1117ce3 commit 28fad3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/host-only/wkdev-enter
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ run() {

echo " Retry ${retries}/${max_retries} in ${sleep_duration_in_seconds} seconds..."
sleep ${sleep_duration_in_seconds}

echo ""
echo " Last 5 lines from container log (invoke 'podman logs ${container_name}' to see the full output):"
echo " ------------------------------------------------------------------"
run_podman ${podman_arguments[@]} logs --tail 5 "${container_name}"
echo " ------------------------------------------------------------------"
echo ""
done;
}

Expand Down

0 comments on commit 28fad3e

Please sign in to comment.