mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 06:43:54 +00:00
Support podman for building release images
podman returns nozero exit code for `docker buildx`, because it misses a subcommand. `docker buildx version` should work both in podman and docker. Tested both with docker-ce-20.10.18 + docker-buildx-plugin-0.10.2 and podman-4.5.0 + podman-docker.
This commit is contained in:
parent
e1ad9bee5b
commit
b2eae2f92e
@ -729,7 +729,8 @@ function kube::util::ensure-cfssl {
|
|||||||
# Check if we have "docker buildx" commands available
|
# Check if we have "docker buildx" commands available
|
||||||
#
|
#
|
||||||
function kube::util::ensure-docker-buildx {
|
function kube::util::ensure-docker-buildx {
|
||||||
if docker buildx >/dev/null 2>&1; then
|
# podman returns 0 on `docker buildx version`, docker on `docker buildx`. One of them must succeed.
|
||||||
|
if docker buildx version >/dev/null 2>&1 || docker buildx >/dev/null 2>&1; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "ERROR: docker buildx not available. Docker 19.03 or higher is required with experimental features enabled"
|
echo "ERROR: docker buildx not available. Docker 19.03 or higher is required with experimental features enabled"
|
||||||
|
Loading…
Reference in New Issue
Block a user