简体   繁体   English

docker machine vs docker for mac

[英]docker machine vs docker for mac

I have installed docker for mac on my machine. 我在我的机器上安装了docker for mac。 I have pulled a repo from the docker hub, the docker run command includes the docker-machine ip parameter for which I get an error, Error: No machine name(s) specified and no "default" machine exist. 我从docker hub中提取了一个repo,docker run命令包含docker-machine ip参数,我得到了一个错误,错误:没有指定机器名,也没有“默认”机器。 Could someone elaborate the difference between docker machine and docker for mac. 有人可以详细说明docker机器和docker for mac之间的区别。

If you have Docker for Mac running on your machine, you don't need Docker Machine. 如果您的计算机上运行了Docker for Mac,则不需要Docker Machine。 Using Docker Machine (usually through Docker Toolbox ) to run locally only if you have an older Mac version that isn't supported, which isn't the case here, or a Windows machine without Windows 10 pro. 使用Docker Machine(通常通过Docker Toolbox )仅在您拥有不受支持的较旧Mac版本(此处不是这种情况)或没有Windows 10 pro的Windows计算机时才能在本地运行。

The only other case you need Docker Machine is for controlling remote machines or setting up multiple nodes locally. 您需要Docker Machine的唯一其他情况是用于控制远程计算机或在本地设置多个节点。

In my Opinion: 在我看来:

Docker for Mac: 适用于Mac的Docker:

  1. Reliably binds containers to 127.1, unlike Vms on Virtualbox 可以将容器可靠地绑定到127.1,与Virtualbox上的Vms不同
  2. Portainer works much more reliably with this Portainer可以更加可靠地工作
  3. Has Kubertenes support Kubertenes是否支持

Docker Machine (aka Docker Toolbox w/VirtualBox): Docker Machine(又名Docker Toolbox w / VirtualBox):

  1. Really meant to be used on older version of MacOs, on older hardware 真的意味着在较旧的硬件上使用旧版本的MacO
  2. Requires installing BOTH Virtubox + Docker 需要安装BOTH Virtubox + Docker
  3. Vms bind to 192.168.99.100 IP, not necessarily to 127.1 Vms绑定到192.168.99.100 IP,不一定绑定到127.1
  4. If you shutdown Kitematic, in some cases is also shuts down your docker-machine without asking you. 如果您关闭Kitematic,在某些情况下也会关闭您的docker-machine而不会询问您。 Sooo annoying. 太烦人了

You need to create the machine first of all. 您首先需要创建机器。 Try running the following command from your terminal of choice: 尝试从您选择的终端运行以下命令:

docker-machine create testmachine

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

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