The host Docker client may be newer than the Docker daemon running
inside minikube, causing builds to fail with "client version X is too
new". Export DOCKER_API_VERSION set to the server's actual API version
after sourcing the minikube docker-env to prevent the mismatch.
Signed-off-by: David Galloway <david.galloway@ibm.com>
source /tmp/minikube-env.sh
rm -f /tmp/minikube-env.sh
+
+ # Pin Docker API version to what minikube's daemon supports,
+ # in case the host docker client is newer
+ if [[ "$CONTAINER_RUNTIME" == "docker" ]]; then
+ export DOCKER_API_VERSION=$(docker version --format '{{.Server.APIVersion}}' 2>/dev/null || echo "1.43")
+ fi
}
build_ceph_image() {