To build and run a Docker image in Minikube running on the Docker container runtime, all I have to do is this:
eval $(minikube docker-env)
docker build -t some/tag .
Minikube will find the image.
But if I run Minikube in cri-o mode, this doesn't work, as expected. Is there a way to load a local Docker image and use that? In theory, any OCI-compliant container image should work?
Also, I'm on macOS if that matters.
Ok, so the official way for Minikube is apparently the
registry
addon: https://minikube.sigs.k8s.io/docs/tasks/registry/insecure/Sounds great, unfortunately K8S refused to pull images from localhost:5000, I had to use the
registry-proxy-ip:80
prefix in the image spec to convince it to pull. I filed an issue here: https://github.com/kubernetes/minikube/issues/6012