You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Machine creates Docker hosts that are secure by default. The connection between the client and daemon is encrypted and authenticated using TLS security. To get the Docker arguments for a machine use the command: `docker-machine config <machine-name>` i.e. `docker-machine config dev`.
41
+
## Installation and documentation
42
42
43
-
You can also get the commands to export environment variables to use with the Docker CLI: `docker-machine env <machine-name>` i.e. `docker-machine env dev` to show or `$(docker-machine env dev)` to load in your environment.
44
-
45
-
## Try it out
46
-
47
-
Machine is still in its early stages. If you'd like to try out a preview build, [download it here](https://github.com/docker/machine/releases/latest).
48
-
49
-
## Swarm
50
-
51
-
Machine can create [Docker Swarm](https://github.com/docker/swarm) clusters.
52
-
53
-
First, create a Swarm token. Optionally, you can use another discovery service.
54
-
See the Swarm docs for details.
55
-
56
-
To create the token, first create a Machine. This example will use VirtualBox.
57
-
58
-
```
59
-
$ docker-machine create -d virtualbox local
60
-
```
61
-
62
-
Load the Machine configuration into your shell:
63
-
64
-
```
65
-
$ $(docker-machine env local)
66
-
```
67
-
Then run generate the token using the Swarm Docker image:
68
-
69
-
```
70
-
$ docker run swarm create
71
-
1257e0f0bbb499b5cd04b4c9bdb2dab3
72
-
```
73
-
Once you have the token, you can create the cluster.
You can load this into your environment using `$(docker-machine env --swarm swarm-master)`.
101
-
102
-
Now you can use the Docker CLI to query:
103
-
104
-
```
105
-
$ docker info
106
-
Containers: 1
107
-
Nodes: 1
108
-
swarm-node-00: 192.168.99.101:2376
109
-
```
110
-
111
-
## Drivers
112
-
113
-
### VirtualBox
114
-
115
-
Creates machines locally on [VirtualBox](https://www.virtualbox.org/). Requires VirtualBox to be installed.
116
-
117
-
Options:
118
-
119
-
-`--virtualbox-boot2docker-url`: The URL of the boot2docker image. Defaults to the latest available version.
120
-
-`--virtualbox-disk-size`: Size of disk for the host in MB. Default: `20000`
121
-
-`--virtualbox-memory`: Size of memory for the host in MB. Default: `1024`
122
-
123
-
### Digital Ocean
124
-
125
-
Creates machines on [Digital Ocean](https://www.digitalocean.com/). You need to create a personal access token under "Apps & API" in the Digital Ocean Control Panel and pass that to `docker-machine create` with the `--digitalocean-access-token` option.
126
-
127
-
Options:
128
-
129
-
-`--digitalocean-access-token`: Your personal access token for the Digital Ocean API.
130
-
-`--digitalocean-image`: The name of the Digital Ocean image to use. Default: `docker`
131
-
-`--digitalocean-region`: The region to create the droplet in. Default: `nyc3`
132
-
-`--digitalocean-size`: The size of the Digital Ocean driver. Default: `512mb`
133
-
134
-
### Microsoft Azure
135
-
136
-
Create machines on [Microsoft Azure](http://azure.microsoft.com/).
137
-
138
-
You need to create a subscription with a cert. Run these commands:
Note: the machine name will be used as DNS name for the Cloud Service (e.g. machinename.cloudapp.net) and needs to be unique within Azure.
165
-
166
-
### Amazon EC2
167
-
168
-
Create machines on [Amazon Web Services](http://aws.amazon.com). You will need an Access Key ID, Secret Access Key and a VPC ID. To find the VPC ID, login to the AWS console and go to Services -> VPC -> Your VPCs. Select the one where you would like to launch the instance.
169
-
170
-
Options:
171
-
172
-
-`--amazonec2-access-key`: **required** Your access key id for the Amazon Web Services API.
173
-
-`--amazonec2-ami`: The AMI ID of the instance to use Default: `ami-4ae27e22`
174
-
-`--amazonec2-instance-type`: The instance type to run. Default: `t2.micro`
175
-
-`--amazonec2-region`: The region to use when launching the instance. Default: `us-east-1`
176
-
-`--amazonec2-root-size`: The root disk size of the instance (in GB). Default: `16`
177
-
-`--amazonec2-secret-key`: **required** Your secret access key for the Amazon Web Services API.
178
-
-`--amazonec2-security-group-name`: AWS VPC security group name. Default: `docker-machine`
179
-
-`--amazonec2-session-token`: Your session token for the Amazon Web Services API.
180
-
-`--amazonec2-subnet-id`: AWS VPC subnet id
181
-
-`--amazonec2-vpc-id`: **required** Your VPC ID to launch the instance in.
182
-
-`--amazonec2-zone`: The AWS zone launch the instance in (i.e. one of a,b,c,d,e). Default: `a`
183
-
184
-
### Google Compute Engine
185
-
186
-
Create machines on [Google Compute Engine](https://cloud.google.com/compute/). You will need a Google account and project name. See https://cloud.google.com/compute/docs/projects for details on projects.
187
-
188
-
The Google driver uses oAuth. When creating the machine, you will have your browser opened to authorize. Once authorized, paste the code given in the prompt to launch the instance.
189
-
190
-
Options:
191
-
192
-
-`--google-zone`: The zone to launch the instance. Default: `us-central1-a`
193
-
-`--google-machine-type`: The type of instance. Default: `f1-micro`
194
-
-`--google-disk-size`: The disk size of the instance (in GB). Default: `10`
195
-
-`--google-username`: The username to use for the instance. Default: `docker-user`
196
-
-`--google-instance-name`: The name of the instance. Default: `docker-machine`
197
-
-`--google-project`: The name of your project to use when launching the instance.
198
-
-`--google-scopes`: The scopes associated to the instance. Comma-separated if multiple scopes. Default: `https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write``
199
-
200
-
### VMware Fusion
201
-
202
-
Creates machines locally on [VMware Fusion](http://www.vmware.com/products/fusion). Requires VMware Fusion to be installed.
203
-
204
-
Options:
205
-
206
-
-`--vmwarefusion-boot2docker-url`: URL for boot2docker image.
207
-
-`--vmwarefusion-disk-size`: Size of disk for host VM (in MB). Default: `20000`
208
-
-`--vmwarefusion-memory-size`: Size of memory for host VM (in MB). Default: `1024`
209
-
210
-
### VMware vCloud Air
211
-
212
-
Creates machines on [vCloud Air](http://vcloud.vmware.com) subscription service. You need an account within an existing subscription of vCloud Air VPC or Dedicated Cloud.
213
-
214
-
Options:
215
-
216
-
-`--vmwarevcloudair-username`: vCloud Air Username.
217
-
-`--vmwarevcloudair-password`: vCloud Air Password.
-`--vmwarevcloudair-vdcid`: Virtual Data Center ID.
231
-
232
-
### VMware vSphere
233
-
234
-
Creates machines on a [VMware vSphere](http://www.vmware.com/products/vsphere) Virtual Infrastructure. Requires a working vSphere (ESXi and optionally vCenter) installation. The vSphere driver depends on [`govc`](https://github.com/vmware/govmomi/tree/master/govc) (must be in path) and has been tested with [vmware/govmomi@`c848630`](https://github.com/vmware/govmomi/commit/c8486300bfe19427e4f3226e3b3eac067717ef17).
235
-
236
-
Options:
237
-
238
-
-`--vmwarevsphere-username`: vSphere Username.
239
-
-`--vmwarevsphere-password`: vSphere Password.
240
-
-`--vmwarevsphere-boot2docker-url`: URL for boot2docker image.
241
-
-`--vmwarevsphere-compute-ip`: Compute host IP where the Docker VM will be instantiated.
242
-
-`--vmwarevsphere-cpu-count`: CPU number for Docker VM. Default: `2`
243
-
-`--vmwarevsphere-datacenter`: Datacenter for Docker VM (must be set to `ha-datacenter` when connecting to a single host).
244
-
-`--vmwarevsphere-datastore`: Datastore for Docker VM.
245
-
-`--vmwarevsphere-disk-size`: Size of disk for Docker VM (in MB). Default: `20000`
246
-
-`--vmwarevsphere-memory-size`: Size of memory for Docker VM (in MB). Default: `2048`
247
-
-`--vmwarevsphere-network`: Network where the Docker VM will be attached.
248
-
-`--vmwarevsphere-pool`: Resource pool for Docker VM.
249
-
-`--vmwarevsphere-vcenter`: IP/hostname for vCenter (or ESXi if connecting directly to a single host).
250
-
251
-
### OpenStack
252
-
253
-
Create machines on [Openstack](http://www.openstack.org/software/)
254
-
255
-
Mandatory:
256
-
257
-
-`--openstack-flavor-id`: The flavor ID to use when creating the machine
258
-
-`--openstack-image-id`: The image ID to use when creating the machine.
259
-
260
-
Options:
261
-
262
-
-`--openstack-auth-url`: Keystone service base URL.
263
-
-`--openstack-username`: User identifer to authenticate with.
264
-
-`--openstack-password`: User password. It can be omitted if the standard environment variable `OS_PASSWORD` is set.
265
-
-`--openstack-tenant-name` or `--openstack-tenant-id`: Identify the tenant in which the machine will be created.
266
-
-`--openstack-region`: The region to work on. Can be omitted if there is ony one region on the OpenStack.
267
-
-`--openstack-endpoint-type`: Endpoint type can be `internalURL`, `adminURL` or `publicURL`. It is a helper for the driver
268
-
to choose the right URL in the OpenStack service catalog. If not provided the default is `publicURL`.
269
-
-`--openstack-net-id`: The private network id the machine will be connected on. If your OpenStack project
270
-
contains only one private network it will be use automatically.
271
-
-`--openstack-sec-groups`: If security groups are available on your OpenStack you can specify a comma separated list
272
-
to use for the machine (e.g. `secgrp001,secgrp002`).
273
-
-`--openstack-floatingip-pool`: The IP pool that will be used to get a public IP and assign it to the machine. If there is an
274
-
IP address already allocated but not assigned to any machine, this IP will be chosen and assigned to the machine. If
275
-
there is no IP address already allocated a new IP will be allocated and assigned to the machine.
276
-
-`--openstack-ssh-user`: The username to use for SSH into the machine. If not provided `root` will be used.
277
-
-`--openstack-ssh-port`: Customize the SSH port if the SSH server on the machine does not listen on the default port.
278
-
279
-
Environment variables:
280
-
281
-
Here comes the list of the supported variables with the corresponding options. If both environment variable
282
-
and CLI option are provided the CLI option takes the precedence.
0 commit comments