简体   繁体   English

在Windows上使用适用于Kubernetes的VirtualBox创建Docker容器

[英]Create a Docker Container using VirtualBox on Windows for Kubernetes

I'm starting to experiment with Kubernetes on my Windows 10 dev machine. 我正在Windows 10开发人员机器上尝试使用Kubernetes。 I've got minikube running on my machine, with some "canned" test services, so it looks like Kubernetes is working properly. 我的机器上已经运行了minikube,并提供了一些“罐装”测试服务,因此Kubernetes看起来工作正常。

Now I'm trying to create my first service by following this: http://kubernetes.io/docs/hellonode/ 现在,我尝试通过以下操作创建我的第一个服务: http : //kubernetes.io/docs/hellonode/

The problem is I can't build the docker image. 问题是我无法构建docker映像。 I get an error that basically says docker isn't running. 我收到一个错误,该错误基本上说docker没有运行。 I've installed the docker toolkit, and I've looked at docker for windows, but it needs hyper-v which doesn't work with Kubernetes (it requires VirtualBox). 我已经安装了docker工具箱,并且已经在Windows上查看了docker,但是它需要hyper-v,它不适用于Kubernetes(它需要VirtualBox)。 So is there any way I can get docker running on windows using VirtualBox? 那么有什么方法可以让我使用VirtualBox在Windows上运行docker?

Once you have the docker client on your host windows machine, you can run 将docker客户端安装在主机Windows计算机上后,即可运行

minikube docker-env --shell powershell

That will point the docker client on your host to the docker daemon inside the minikube VM. 这会将主机上的Docker客户端指向minikube VM中的docker守护程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM