manvendra
manvendra

Reputation: 531

On Windows Setup, how can I get docker image from local machine

I could understand, different ways to access docker image from local machine to Minikube VM.

(Kubernetes + Minikube) can't get docker image from local registry

All these examples are for Mac/Linux user.

I'm looking for an equivalent suggestion for Windows user.

What's windows equivalent to -> eval $(minikube docker-env)

Upvotes: 12

Views: 15466

Answers (8)

Yuvaraj
Yuvaraj

Reputation: 550

Please open windows powershell as mentioned in above answers, execute minikube docker-env.

--> result of the output , note down last line and execute it to point to docker instance inside k8s. I found below command, which is working for me.

minikube -p minikube docker-env --shell powershell | Invoke-Expression

Upvotes: 0

Ankur Chaudhary
Ankur Chaudhary

Reputation: 1

These are the 3 commands basically you have to run -

minikube start minikube docker-env & minikube -p minikube docker-env | Invoke-Expression

Upvotes: 0

Appy
Appy

Reputation: 51

Little late to the party but you can do this on Windows:

minikube cache add alpine:latest

which gave me message that it is deprecated.

So finally use this:- minikube image load imagename

where imagename is docker daemons image name

Ref: https://minikube.sigs.k8s.io/docs/commands/image/#minikube-image-load

Upvotes: 0

Vijayanath Viswanathan
Vijayanath Viswanathan

Reputation: 8541

You can use below command in the command prompt,

@FOR /f "tokens=*" %i IN ('minikube -p minikube docker-env') DO @%i

In fact when you run the command minikube docker-env it will instruct you how to connect,

enter image description here

Upvotes: 4

IvanCl4udio
IvanCl4udio

Reputation: 55

Like manvedra said ,those steps worked for me too. In a powershell command prompt and run the following commands:

minikube start, to start minikube cluster.

minikube docker-env, it will configure some environment variables and at bottom it will show the last command to be run.

minikube -p minikube docker-env | Invoke-Expression , last step.

Done.

Upvotes: 1

Ivan Vovk
Ivan Vovk

Reputation: 1039

Same error and this solution doesn't work for me.

I found this solution here.

You should install docker separate way:

  1. Download choco and with it help
  2. Install docker-desktop
  3. Restart entire your machine(don't forgive do it!)
  4. Now you can do whatever you want to do with docker from command line

Upvotes: 0

manvendra
manvendra

Reputation: 531

I found relatively easy way to point docker client(docker-machine) to minikube’s docker environment by running below commands in PowerShell ->

PS C:\Users\ABC> minikube docker-env

PS C:\Users\ABC> minikube docker-env | Invoke-Expression

Upvotes: 21

Fendi jatmiko
Fendi jatmiko

Reputation: 2895

What's windows equivalent to -> eval $(minikube docker-env)

either docker-machine env my-default

or

@FOR /f "tokens=*" %i IN ('docker-machine env YOURMACHINENAME') DO @%i

Upvotes: -1

Related Questions