Skip to content

Commit

Permalink
#65 Debug /opt/kafka/config/ not writable - test using GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Aug 20, 2024
1 parent 687bb77 commit 5887924
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/print-container-logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
π#! /bin/bash -e

CONTAINER_IDS=$(docker ps -a -q)

for id in $CONTAINER_IDS ; do
echo "\n--------------------"
echo "logs of:\n"
(docker ps -a -f "id=$id" || echo container gone: $id)
echo "\n"
(docker logs $id || echo container gone: $id)
echo "--------------------\n"
done

mkdir -p ~/container-logs

docker ps -a > ~/container-logs/containers.txt

for name in $(docker ps -a --format "{{.Names}}") ; do
(docker logs $name || echo container gone: $name) > ~/container-logs/${name}.log
done

0 comments on commit 5887924

Please sign in to comment.