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

自古美人都是妖i 提交于 2020-05-08 09:47:19

问题


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)


回答1:


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




回答2:


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



回答3:


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.




回答4:


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



来源:https://stackoverflow.com/questions/48376928/on-windows-setup-how-can-i-get-docker-image-from-local-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!