fix(ci): read docker logs from file instead of removed container

Use the log file dumped during container cleanup instead of trying to run docker logs on an already-removed container.
This commit is contained in:
Ashwin Bharambe 2025-10-20 22:25:55 -07:00
parent ef08ebff30
commit 60c2350fdf

View file

@ -418,10 +418,10 @@ else
echo "--- Last 100 lines of server.log ---" echo "--- Last 100 lines of server.log ---"
tail -100 server.log tail -100 server.log
elif [[ "$STACK_CONFIG" == *"docker:"* ]]; then elif [[ "$STACK_CONFIG" == *"docker:"* ]]; then
container_name="llama-stack-test-$DISTRO" docker_log_file="docker-${DISTRO}-${INFERENCE_MODE}.log"
if docker ps -a --format '{{.Names}}' | grep -q "^${container_name}$"; then if [[ -f "$docker_log_file" ]]; then
echo "--- Last 100 lines of docker logs for $container_name ---" echo "--- Last 100 lines of $docker_log_file ---"
docker logs "$container_name" 2>&1 | tail -100 tail -100 "$docker_log_file"
fi fi
fi fi