You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mimaison (via GitHub)" <gi...@apache.org> on 2025/10/02 09:36:38 UTC
Re: [PR] KAFKA-19745: Add support for podman when running system tests [kafka]
mimaison commented on code in PR #20546:
URL: https://github.com/apache/kafka/pull/20546#discussion_r2398017127
##########
tests/docker/ducker-ak:
##########
@@ -142,6 +148,29 @@ require_commands() {
done
}
+# Detect and set the container runtime (docker or podman).
+# Sets the global variable container_runtime.
+# Can be overridden by setting CONTAINER_RUNTIME environment variable.
+detect_container_runtime() {
+ if [[ -n "${container_runtime}" ]]; then
+ return # Already set
+ fi
+
+ # Allow override via environment variable
+ if [[ -n "${CONTAINER_RUNTIME}" ]]; then
+ container_runtime="${CONTAINER_RUNTIME}"
+ which "${container_runtime}" &> /dev/null || die "Specified container runtime '${container_runtime}' not found."
+ return
+ fi
+
+ container_runtime="docker"
+ if command -v podman &> /dev/null; then
+ container_runtime="podman"
+ else
+ die "No supported container runtime found. Please install docker or podman, or set CONTAINER_RUNTIME environment variable."
Review Comment:
If this right? If `podman` is not available, aren't we going to enter this `else` block and always fail?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org