简体   繁体   English

Linux 上需要 docker-machine 吗?

[英]Is docker-machine required on linux?

I am running a Windows7 (64-bit) machine having vmplayer , which hosts Fedora 25 .我正在运行带有vmplayerWindows7 (64 位)机器,它承载Fedora 25

I have installed docker CE on it and my examples till now have worked fine.我已经在它上面安装了docker CE ,我的例子到现在都运行良好。

The issue is when trying to run docker-machine examples.问题是在尝试运行docker-machine示例时。 As per my understanding, it is required to create hosts for docker.根据我的理解,需要为 docker 创建主机。

  • While it makes sense to have it on Windows and Mac but do I need it on Linux ?虽然在WindowsMac上使用它很有意义,但我需要在Linux它吗?

  • What even adds to confusion is, how come all the examples I tried till now have worked fine?更令人困惑的是,为什么我迄今为止尝试过的所有示例都运行良好?

  • Another point is, if docker-machine is not part of Linux docker distribution;还有一点是,如果docker-machine不是Linux docker 发行Linux一部分; then how do we create multiple docker hosts on Linux ?那么我们如何在Linux上创建多个 docker 主机呢?

Docker-machine is a tool that simplifies running docker on VMs, but it's not required in any environment if you want to manage the VM yourself. Docker-machine 是一个简化在虚拟机上运行 docker 的工具,但是如果你想自己管理虚拟机,它在任何环境中都不是必需的。 Since docker runs natively on Linux, there's no need to docker-machine to perform that install, you just install docker directly.由于 docker 在 Linux 上本地运行,因此不需要 docker-machine 来执行该安装,您只需直接安装 docker。 This is what most people do with a Linux host.这是大多数人对 Linux 主机所做的事情。

If you need multiple docker hosts on Linux for some reason, you can create and manage your own VMs, eg virtualbox and vagrant, or you can use docker-machine as a front end on that which also handles the machine image and gives a convenient command line to switch the docker CLI between environments.如果您出于某种原因需要在 Linux 上使用多个 docker 主机,您可以创建和管理您自己的虚拟机,例如 virtualbox 和 vagrant,或者您可以使用 docker-machine 作为前端,它也处理机器映像并提供方便的命令用于在环境之间切换 docker CLI 的行。

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

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