Skip to content

Make it possible to build with `podman` instead of `docker` using `DOCKER=podman`.

Created by: adelton

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR expands on the DOCKER="${DOCKER:-docker}" logic in hack/verify-shellcheck.sh to the whole build/ suite, making it possible to build Kubernetes with a different docker-compatible command like podman. It can be used as DOCKER=podman build/run.sh make or make quick-release DOCKER=podman (these I tried).

While it was possible to build Kubernetes in a docker-less environment by symlinking /usr/bin/docker -> podman or by doing function docker() { podman "$@"; }; export -f docker, the first was unnecessarily heavyweight and the second did not work when make or kind build got involved..

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

I did not amend the build documentation claiming that podman was supported so this remains mostly hidden, like the current hack/verify-shellcheck.sh mechanism. I can amend to add a note to the documentation, calling it experimental or unsupported or something.

Thanks go to @BenTheElder who pointed me to the DOCKER environment variable convention in https://github.com/kubernetes-sigs/kind/pull/3394#discussion_r1370708217.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

Merge request reports

Loading