Use local Docker images with Minikube

Use the Minikube Docker


In Minikube, you can load local Docker images into the Minikube environment directly.

Steps:

  1. Enable Minikube’s Docker daemon: Run the following command to use Minikube’s Docker daemon, which makes images available directly to Minikube:
eval $(minikube docker-env)
  1. Build or Tag the Image: Now, you can build or tag your Docker image locally, and it will be available in Minikube.
docker build -t my-local-image:latest .
  1. Deploy in Kubernetes: After building or tagging, you can refer to my-local-image:latest in your Kubernetes manifests, and Minikube will use the locally available image.

  2. Turn Off Minikube Docker: When done, exit Minikube’s Docker environment:

eval $(minikube docker-env -u)

Follow X/Twitter.