Add Docker runtime support to podman-env command

Extend podman-env compatibility to support both crio and docker container
runtimes, providing users with more deployment flexibility while maintaining
the core Docker API compatibility approach that eliminates API version
conflicts.

This change allows podman-env to work with:
- Podman driver + crio runtime (original support)
- Podman driver + docker runtime (new support)

Both configurations use the same Docker API compatibility approach that
was implemented to address reviewer feedback about SSH-based connectivity
issues and API version mismatches.
pull/21259/head
elasticdotventures 2025-08-05 04:31:53 +00:00
parent 9457fa1220
commit 0dda539974
1 changed files with 4 additions and 3 deletions

View File

@ -129,9 +129,10 @@ var podmanEnvCmd = &cobra.Command{
exit.Message(reason.Usage, `The podman-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/`)
}
if co.Config.KubernetesConfig.ContainerRuntime != constants.CRIO {
exit.Message(reason.Usage, `The podman-env command is only compatible with the "crio" runtime, but this cluster was configured to use the "{{.runtime}}" runtime.`,
out.V{"runtime": co.Config.KubernetesConfig.ContainerRuntime})
cr := co.Config.KubernetesConfig.ContainerRuntime
if cr != constants.CRIO && cr != constants.Docker {
exit.Message(reason.Usage, `The podman-env command is only compatible with the "crio" and "docker" runtimes, but this cluster was configured to use the "{{.runtime}}" runtime.`,
out.V{"runtime": cr})
}
r := co.CP.Runner