Docker Machine

Docker Machine

Machine lets you create Docker hosts on your computer, on cloud providers, andinside your own data center. It automatically creates hosts, installs Docker onthem, then configures the docker client to talk to them. A “machine” is thecombination of a Docker host and a configured client.

Once you create one or more Docker hosts, Docker Machine supplies a number ofcommands for managing them. Using these commands you can

  • start, inspect, stop, and restart a host
  • upgrade the Docker client and daemon
  • configure a Docker client to talk to your host

Looking for the installation docs?

For Windows or Mac, you can obtain Docker Machine by installing the DockerToolbox. To read instructions for installingMachine on Linux or for installing Machine alone without Docker Toolbox, see theMachine installation instructions.

Understand Docker Machine basic concepts

Docker Machine allows you to provision Docker on virtual machines that resideeither on your local system or on a cloud provider. Docker Machine creates ahost on a VM and you use the Docker Engine client as needed to build images andcreate containers on the host.

To create a virtual machine, you supply Docker Machine with the name of thedriver you want use. The driver represents the virtual environment. For example,on a local Linux, Mac, or Windows system the driver is typically Oracle VirtualBox. For cloud providers, Docker Machine supports drivers such as AWS, MicrosoftAzure, Digital Ocean and many more. The Docker Machine reference includes acomplete list of the supported drivers.

Since Docker runs on Linux, each VM that Docker Machine provisions relies on abase operating system. For convenience, there are default base operatingsystems. For the Oracle Virtual Box driver, this base operating system is theboot2docker.iso. For drivers used to connect to cloud providers, the baseoperating system is Ubuntu 12.04+. You can change this default when you create amachine. The Docker Machine reference includes a complete list of the supportedoperating systems.

For each machine you create, the Docker host address is the IP address of theLinux VM. This address is assigned by the docker-machine create subcommand.You use the docker-machine ls command to list the machines you have created.The docker-machine ip <machine-name> command returns a specific host’s IPaddress.

Before you can run a docker command on a machine, you configure yourcommand-line to point to that machine. The docker-machine env <machine-name>subcommand outputs the configuration command you should use. When you run acontainer on the Docker host, the container’s ports map to ports on the VM.

For a complete list of the docker-machine subcommands, see the Docker Machinesubcommand reference.

Crash Reporting

Provisioning a host is a complex matter that can fail for a lot of reasons.Your workstation may have a wide variety of shell, network configuration, VPN,proxy or firewall issues. There are also reasons from the other end of thechain: your cloud provider or the network in between.

To help docker-machine be as stable as possible, we added a monitoring ofcrashes whenever you try to create or upgrade a host. This will send, overHTTPS, to Bugsnag some information about your docker-machine version, build,OS, ARCH, the path to your current shell and, the history of the last command asyou could see it with a --debug option. This data is sent to help us pinpointrecurring issues with docker-machine and will only be transmitted in the caseof a crash of docker-machine.

If you wish to opt out of error reporting, you can create a no-error-reportfile in your $HOME/.docker/machine directory, and Docker Machine will disablethis behavior. e.g.:

$ mkdir -p ~/.docker/machine && touch ~/.docker/machine/no-error-report

Leaving the file empty is fine – Docker Machine just checks for its presence.

Getting help

Docker Machine is still in its infancy and under active development. If you needhelp, would like to contribute, or simply want to talk about the project withlike-minded individuals, we have a number of open channels for communication.

For more information and resources, please visitour help page.

Where to go next

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值