【问题标题】:How I can create docker-machine from Command-Line on Docker for Mac without VirtualBox?如何在没有 VirtualBox 的情况下在 Docker for Mac 上从命令行创建 docker-machine?
【发布时间】:2016-06-27 12:04:28
【问题描述】:

我使用 docker for mac(不是 docker 工具箱)
我知道我不必手动创建 docker-machine。

但我想在没有 virtualbox 的情况下从命令行创建 Docker Machine。

我想在 Docker 上使用基于 xhyve 的 VM 而不是 VirtualBox。

有没有办法从命令行创建它?

编辑:

以下是我 Mac 上docker-machine --help 的输出

Usage: docker-machine [OPTIONS] COMMAND [arg...]

Create and manage machines running Docker.

Version: 0.8.0-rc1, build fffa6c9

Author:
  Docker Machine Contributors - <https://github.com/docker/machine>

Options:
  --debug, -D                       Enable debug mode
  --storage-path, -s "/Users/username/.docker/machine"  Configures storage path [$MACHINE_STORAGE_PATH]
  --tls-ca-cert                     CA to verify remotes against [$MACHINE_TLS_CA_CERT]
  --tls-ca-key                      Private key to generate certificates [$MACHINE_TLS_CA_KEY]
  --tls-client-cert                     Client cert to use for TLS [$MACHINE_TLS_CLIENT_CERT]
  --tls-client-key                  Private key used in client TLS auth [$MACHINE_TLS_CLIENT_KEY]
  --github-api-token                    Token to use for requests to the Github API [$MACHINE_GITHUB_API_TOKEN]
  --native-ssh                      Use the native (Go-based) SSH implementation. [$MACHINE_NATIVE_SSH]
  --bugsnag-api-token                   BugSnag API token for crash reporting [$MACHINE_BUGSNAG_API_TOKEN]
  --help, -h                        show help
  --version, -v                     print the version

Commands:
  active        Print which machine is active
  config        Print the connection config for machine
  create        Create a machine
  env           Display the commands to set up the environment for the Docker client
  inspect       Inspect information about a machine
  ip            Get the IP address of a machine
  kill          Kill a machine
  ls            List machines
  provision     Re-provision existing machines
  regenerate-certs  Regenerate TLS Certificates for a machine
  restart       Restart a machine
  rm            Remove a machine
  ssh           Log into or run a command on a machine with SSH.
  scp           Copy files between machines
  start         Start a machine
  status        Get the status of a machine
  stop          Stop a machine
  upgrade       Upgrade a machine to the latest version of Docker
  url           Get the URL of a machine
  version       Show the Docker Machine version or a machine docker version
  help          Shows a list of commands or help for one command

Run 'docker-machine COMMAND --help' for more information on a command.

【问题讨论】:

  • 编辑问题。
  • 您的 Mac 中是否安装了 docker 工具箱或 Docker for Mac beta?如果你已经安装了 Docker for Mac beta,那么你就不需要安装任何虚拟机了。
  • @techtabu 我已经为 mac 安装了 docker。所以我知道我不必安装VM,但我想尝试使用docker-machine create 命令。
  • 我认为如果您安装了 Mac 版 Docker,docker-machine 命令将不可用。我无法 100% 验证它,因为我都安装在我的 Mac 中。你得到docker-machine help 的任何输出了吗? Docker for Mac 已经使用轻量级 xhyve。但是,请检查此link,如果这是您想要做的。 GIthub 代表 xhyve。

标签: docker docker-machine


【解决方案1】:

根据文档(https://docs.docker.com/machine/drivers/),只有驱动程序列表:

  • 亚马逊网络服务
  • 微软 Azure
  • 数字海洋
  • Exoscale
  • 谷歌计算引擎
  • 通用
  • Microsoft Hyper-V
  • OpenStack
  • 机架空间
  • IBM 软层
  • Oracle VirtualBox
  • VMware vCloud Air
  • VMware 融合
  • VMware vSphere

xhyve 没有驱动

编辑

我找到了一个用于 xhyve 的 docker-machine 驱动插件,看看这个项目:

https://github.com/zchee/docker-machine-driver-xhyve

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-11-21
    • 1970-01-01
    • 2015-12-14
    • 2018-02-17
    • 1970-01-01
    • 1970-01-01
    • 2020-08-23
    • 2017-12-18
    相关资源
    最近更新 更多