From cb7c3080cd9438ebe2548618cdb4caa9b65f459a Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 24 Sep 2020 14:06:01 +0200 Subject: [PATCH] ci: do not assume Docker is availble on the minikube host Instead of using the Docker command to push the image to to minikube VM, read the image from stdin over ssh and load it with the Docker command that is available inside the VM. Signed-off-by: Niels de Vos --- scripts/minikube.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/minikube.sh b/scripts/minikube.sh index 3c632e4d7..ca743a3ce 100755 --- a/scripts/minikube.sh +++ b/scripts/minikube.sh @@ -26,7 +26,13 @@ function copy_image_to_cluster() { ${CONTAINER_CMD} tag "${build_image}" "${final_image}" return fi - ${CONTAINER_CMD} save "${build_image}" | (eval "$(${minikube} docker-env --shell bash)" && docker load && docker tag "${build_image}" "${final_image}") + + # "minikube ssh" fails to read the image, so use standard ssh instead + ${CONTAINER_CMD} save "${build_image}" | \ + ssh \ + -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ + -i "$(${minikube} ssh-key)" -l docker \ + "$(${minikube} ip)" docker image load } # parse the minikube version, return the digit passed as argument