mirror of https://github.com/docker/docs.git
Merge pull request #2435 from dgageot/lint-markdown
Lint all Markdown documents
This commit is contained in:
commit
e9470d3b26
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,5 +1,4 @@
|
||||||
Changelog
|
# Changelog
|
||||||
==========
|
|
||||||
|
|
||||||
# 0.5.1 (2015-11-16)
|
# 0.5.1 (2015-11-16)
|
||||||
|
|
||||||
|
@ -57,17 +56,20 @@ Changelog
|
||||||
# 0.4.0 (2015-08-11)
|
# 0.4.0 (2015-08-11)
|
||||||
|
|
||||||
## Updates
|
## Updates
|
||||||
|
|
||||||
- HTTP Proxy support for Docker Engine
|
- HTTP Proxy support for Docker Engine
|
||||||
- RedHat distros now use Docker Yum repositories
|
- RedHat distros now use Docker Yum repositories
|
||||||
- Ability to set environment variables in the Docker Engine
|
- Ability to set environment variables in the Docker Engine
|
||||||
- Internal libmachine updates for stability
|
- Internal libmachine updates for stability
|
||||||
|
|
||||||
## Drivers
|
## Drivers
|
||||||
|
|
||||||
- Google:
|
- Google:
|
||||||
- Preemptible instances
|
- Preemptible instances
|
||||||
- Static IP support
|
- Static IP support
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- Swarm Discovery Flag is verified
|
- Swarm Discovery Flag is verified
|
||||||
- Timeout added to `ls` command to prevent hangups
|
- Timeout added to `ls` command to prevent hangups
|
||||||
- SSH command failure now reports information about error
|
- SSH command failure now reports information about error
|
||||||
|
@ -76,6 +78,7 @@ Changelog
|
||||||
# 0.3.0 (2015-06-18)
|
# 0.3.0 (2015-06-18)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Engine option configuration (ability to configure all engine options)
|
- Engine option configuration (ability to configure all engine options)
|
||||||
- Swarm option configuration (ability to configure all swarm options)
|
- Swarm option configuration (ability to configure all swarm options)
|
||||||
- New Provisioning system to allow for greater flexibility and stability for installing and configuring Docker
|
- New Provisioning system to allow for greater flexibility and stability for installing and configuring Docker
|
||||||
|
@ -95,6 +98,7 @@ Changelog
|
||||||
- Specify Swarm version (`--swarm-image` flag)
|
- Specify Swarm version (`--swarm-image` flag)
|
||||||
|
|
||||||
## Drivers
|
## Drivers
|
||||||
|
|
||||||
- New: Exoscale Driver
|
- New: Exoscale Driver
|
||||||
- New: Generic Driver (provision any host with supported base OS and SSH)
|
- New: Generic Driver (provision any host with supported base OS and SSH)
|
||||||
- Amazon EC2
|
- Amazon EC2
|
||||||
|
@ -125,16 +129,19 @@ Changelog
|
||||||
- Shared folder support
|
- Shared folder support
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- Provisioning improvements to ensure Docker is available
|
- Provisioning improvements to ensure Docker is available
|
||||||
- SSH improvements for provisioning stability
|
- SSH improvements for provisioning stability
|
||||||
- Fixed SSH key generation bug on Windows
|
- Fixed SSH key generation bug on Windows
|
||||||
- Help formatting for improved readability
|
- Help formatting for improved readability
|
||||||
|
|
||||||
## Breaking Changes
|
## Breaking Changes
|
||||||
|
|
||||||
- "Short-Form" name reference no longer supported Instead of "docker-machine " implying the active host you must now use docker-machine
|
- "Short-Form" name reference no longer supported Instead of "docker-machine " implying the active host you must now use docker-machine
|
||||||
- VMware shared folders require Boot2Docker 1.7
|
- VMware shared folders require Boot2Docker 1.7
|
||||||
|
|
||||||
## Special Thanks
|
## Special Thanks
|
||||||
|
|
||||||
We would like to thank all contributors. Machine would not be where it is
|
We would like to thank all contributors. Machine would not be where it is
|
||||||
without you. We would also like to give special thanks to the following
|
without you. We would also like to give special thanks to the following
|
||||||
contributors for outstanding contributions to the project:
|
contributors for outstanding contributions to the project:
|
||||||
|
@ -207,8 +214,8 @@ Core Stability and Driver Updates
|
||||||
- Commands now use eval for better interoperability with shell
|
- Commands now use eval for better interoperability with shell
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
- New integration test framework (bats)
|
|
||||||
|
|
||||||
|
- New integration test framework (bats)
|
||||||
|
|
||||||
# 0.1.0 (2015-02-26)
|
# 0.1.0 (2015-02-26)
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,12 @@ To build the `docker-machine` binary using containers, simply run:
|
||||||
|
|
||||||
Make sure the source code directory is under a correct directory structure to use Go 1.5 vendoring;
|
Make sure the source code directory is under a correct directory structure to use Go 1.5 vendoring;
|
||||||
example of cloning and preparing the correct environment `GOPATH`:
|
example of cloning and preparing the correct environment `GOPATH`:
|
||||||
```
|
|
||||||
mkdir docker-machine
|
mkdir docker-machine
|
||||||
cd docker-machine
|
cd docker-machine
|
||||||
export GOPATH="$PWD"
|
export GOPATH="$PWD"
|
||||||
go get github.com/docker/machine
|
go get github.com/docker/machine
|
||||||
cd src/github.com/docker/machine
|
cd src/github.com/docker/machine
|
||||||
```
|
|
||||||
|
|
||||||
At this point, simply run:
|
At this point, simply run:
|
||||||
|
|
||||||
|
@ -56,6 +55,7 @@ You may call:
|
||||||
to clean-up build results.
|
to clean-up build results.
|
||||||
|
|
||||||
## Tests and validation
|
## Tests and validation
|
||||||
|
|
||||||
We use the usual `go` tools for this, to run those commands you need at least the linter which you can
|
We use the usual `go` tools for this, to run those commands you need at least the linter which you can
|
||||||
install with `go get -u github.com/golang/lint/golint`
|
install with `go get -u github.com/golang/lint/golint`
|
||||||
|
|
||||||
|
@ -67,7 +67,6 @@ If you want more indepth validation (vet, lint), and all tests with race detecti
|
||||||
|
|
||||||
$ make validate
|
$ make validate
|
||||||
|
|
||||||
|
|
||||||
If you make a pull request, it is highly encouraged that you submit tests for
|
If you make a pull request, it is highly encouraged that you submit tests for
|
||||||
the code that you have added or modified in the same pull request.
|
the code that you have added or modified in the same pull request.
|
||||||
|
|
||||||
|
@ -77,7 +76,7 @@ To generate an html code coverage report of the Machine codebase, run:
|
||||||
|
|
||||||
make coverage-serve
|
make coverage-serve
|
||||||
|
|
||||||
And navigate to http://localhost:8000 (hit `CTRL+C` to stop the server).
|
And navigate to <http://localhost:8000> (hit `CTRL+C` to stop the server).
|
||||||
|
|
||||||
### Native build
|
### Native build
|
||||||
|
|
||||||
|
@ -211,7 +210,6 @@ Keep in mind that Machine supports environment variables for many of these
|
||||||
flags. So, for instance, you could run the command (substituting, of course,
|
flags. So, for instance, you could run the command (substituting, of course,
|
||||||
the proper secrets):
|
the proper secrets):
|
||||||
|
|
||||||
```
|
|
||||||
$ DRIVER=amazonec2 \
|
$ DRIVER=amazonec2 \
|
||||||
AWS_VPC_ID=vpc-xxxxxxx \
|
AWS_VPC_ID=vpc-xxxxxxx \
|
||||||
AWS_SECRET_ACCESS_KEY=yyyyyyyyyyyyy \
|
AWS_SECRET_ACCESS_KEY=yyyyyyyyyyyyy \
|
||||||
|
@ -219,7 +217,6 @@ $ DRIVER=amazonec2 \
|
||||||
AWS_AMI=ami-12663b7a \
|
AWS_AMI=ami-12663b7a \
|
||||||
AWS_SSH_USER=ec2-user \
|
AWS_SSH_USER=ec2-user \
|
||||||
make test-integration test/integration/core
|
make test-integration test/integration/core
|
||||||
```
|
|
||||||
|
|
||||||
in order to run the core tests on Red Hat Enterprise Linux on Amazon.
|
in order to run the core tests on Red Hat Enterprise Linux on Amazon.
|
||||||
|
|
||||||
|
|
|
@ -14,18 +14,21 @@ For what is coming in specific releases, see our [upcoming
|
||||||
milestones](https://github.com/docker/machine/milestones).)
|
milestones](https://github.com/docker/machine/milestones).)
|
||||||
|
|
||||||
### Docker Engine / Swarm Configuration
|
### Docker Engine / Swarm Configuration
|
||||||
|
|
||||||
Currently there are only a few things that can be configured in the Docker Engine and Swarm. This will enable more operations such as Engine labels and Swarm strategies.
|
Currently there are only a few things that can be configured in the Docker Engine and Swarm. This will enable more operations such as Engine labels and Swarm strategies.
|
||||||
|
|
||||||
### Boot2Docker Migration Support
|
### Boot2Docker Migration Support
|
||||||
|
|
||||||
Currently both Machine and Boot2Docker provider similar functionality. This will enable users to migrate from boot2docker to machine.
|
Currently both Machine and Boot2Docker provider similar functionality. This will enable users to migrate from boot2docker to machine.
|
||||||
|
|
||||||
### Expand Provisioner
|
### Expand Provisioner
|
||||||
|
|
||||||
Machine currently supports running Boot2Docker for "local" providers and Ubuntu for "remote" providers. This will expand the provisioning capabilities to include other base operating systems such as Red Hat-like distributions and possibly other "just enough" operating systems.
|
Machine currently supports running Boot2Docker for "local" providers and Ubuntu for "remote" providers. This will expand the provisioning capabilities to include other base operating systems such as Red Hat-like distributions and possibly other "just enough" operating systems.
|
||||||
|
|
||||||
### Windows Experience
|
### Windows Experience
|
||||||
|
|
||||||
Currently, the Machine on Windows experience is not as good as the Mac / Linux. There is no "recommended" path to use Machine and there are several inconsistencies on Windows such as logging and output formatting.
|
Currently, the Machine on Windows experience is not as good as the Mac / Linux. There is no "recommended" path to use Machine and there are several inconsistencies on Windows such as logging and output formatting.
|
||||||
|
|
||||||
Project Planning
|
# Project Planning
|
||||||
================
|
|
||||||
|
|
||||||
An [Open-Source Planning Process](https://github.com/docker/machine/wiki/Open-Source-Planning-Process) is used to define the Roadmap. [Project Pages](https://github.com/docker/machine/wiki) define the goals for each Milestone and identify current progress.
|
An [Open-Source Planning Process](https://github.com/docker/machine/wiki/Open-Source-Planning-Process) is used to define the Roadmap. [Project Pages](https://github.com/docker/machine/wiki) define the goals for each Milestone and identify current progress.
|
||||||
|
|
|
@ -16,17 +16,17 @@ pull request adding the relevant information to the list. Submitting your
|
||||||
driver here will allow others to discover it and the core Machine team to keep
|
driver here will allow others to discover it and the core Machine team to keep
|
||||||
you informed of upstream changes.
|
you informed of upstream changes.
|
||||||
|
|
||||||
__NOTE__: The linked repositories are not maintained by or formally associated
|
**NOTE**: The linked repositories are not maintained by or formally associated
|
||||||
with Docker Inc. Use 3rd party plugins at your own risk.
|
with Docker Inc. Use 3rd party plugins at your own risk.
|
||||||
|
|
||||||
| Name | Repository | Maintainer GitHub Handle | Maintainer Email |
|
| Name | Repository | Maintainer GitHub Handle | Maintainer Email |
|
||||||
| ---- | ---------- | ------------------------- | ---------------- |
|
| ---------------------- | -------------------------------------------------------------- | --------------------------------------------------- | ------------------------- |
|
||||||
| Amazon Cloud Formation | https://github.com/jeffellin/machine-cloudformation |[Jeff Ellin](https://github.com/jeffellin) | acf@ellin.com |
|
| Amazon Cloud Formation | <https://github.com/jeffellin/machine-cloudformation> | [Jeff Ellin](https://github.com/jeffellin) | acf@ellin.com |
|
||||||
| BrightBox | https://github.com/brightbox/docker-machine-driver-brightbox | [NeilW](https://github.com/NeilW) | neil@aldur.co.uk |
|
| BrightBox | <https://github.com/brightbox/docker-machine-driver-brightbox> | [NeilW](https://github.com/NeilW) | neil@aldur.co.uk |
|
||||||
| Docker-In-Docker | https://github.com/nathanleclaire/docker-machine-driver-dind | [nathanleclaire](https://github.com/nathanleclaire) | nathan.leclaire@gmail.com |
|
| Docker-In-Docker | <https://github.com/nathanleclaire/docker-machine-driver-dind> | [nathanleclaire](https://github.com/nathanleclaire) | nathan.leclaire@gmail.com |
|
||||||
| HPE OneView | https://github.com/HewlettPackard/docker-machine-oneview | [wenlock](https://github.com/wenlock) | wenlock@hpe.com |
|
| HPE OneView | <https://github.com/HewlettPackard/docker-machine-oneview> | [wenlock](https://github.com/wenlock) | wenlock@hpe.com |
|
||||||
| Packet | https://github.com/packethost/docker-machine-driver-packet | [betawaffle](https://github.com/betawaffle) | andy@packet.net |
|
| Packet | <https://github.com/packethost/docker-machine-driver-packet> | [betawaffle](https://github.com/betawaffle) | andy@packet.net |
|
||||||
| Parallels for OSX | https://github.com/Parallels/docker-machine-parallels | [legal90](https://github.com/legal90) | legal90@gmail.com |
|
| Parallels for OSX | <https://github.com/Parallels/docker-machine-parallels> | [legal90](https://github.com/legal90) | legal90@gmail.com |
|
||||||
| SAKURA CLOUD | https://github.com/yamamoto-febc/docker-machine-sakuracloud | [yamamoto-febc](https://github.com/yamamoto-febc) | yamamoto.febc@gmail.com |
|
| SAKURA CLOUD | <https://github.com/yamamoto-febc/docker-machine-sakuracloud> | [yamamoto-febc](https://github.com/yamamoto-febc) | yamamoto.febc@gmail.com |
|
||||||
| VULTR | https://github.com/janeczku/docker-machine-vultr | [janeczku](https://github.com/janeczku) | jb@festplatte.eu.org |
|
| VULTR | <https://github.com/janeczku/docker-machine-vultr> | [janeczku](https://github.com/janeczku) | jb@festplatte.eu.org |
|
||||||
| xhyve | https://github.com/zchee/docker-machine-xhyve | [zchee](https://github.com/zchee) | zchee.io@gmail.com |
|
| xhyve | <https://github.com/zchee/docker-machine-xhyve> | [zchee](https://github.com/zchee) | zchee.io@gmail.com |
|
||||||
|
|
|
@ -10,79 +10,95 @@ parent="mn_install"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Machine Driver Specification v1
|
# Machine Driver Specification v1
|
||||||
|
|
||||||
This is the standard configuration and specification for version 1 drivers.
|
This is the standard configuration and specification for version 1 drivers.
|
||||||
|
|
||||||
Along with defining how a driver should provision instances, the standard
|
Along with defining how a driver should provision instances, the standard
|
||||||
also discusses behavior and operations Machine expects.
|
also discusses behavior and operations Machine expects.
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
The following are required for a driver to be included as a supported driver
|
The following are required for a driver to be included as a supported driver
|
||||||
for Docker Machine.
|
for Docker Machine.
|
||||||
|
|
||||||
## Base Operating System
|
## Base Operating System
|
||||||
|
|
||||||
The provider must offer a base operating system supported by the Docker Engine.
|
The provider must offer a base operating system supported by the Docker Engine.
|
||||||
|
|
||||||
Currently Machine requires Ubuntu for non-Boot2Docker machines. This will
|
Currently Machine requires Ubuntu for non-Boot2Docker machines. This will
|
||||||
change in the future.
|
change in the future.
|
||||||
|
|
||||||
## API Access
|
## API Access
|
||||||
|
|
||||||
We prefer accessing the provider service via HTTP APIs and strongly recommend
|
We prefer accessing the provider service via HTTP APIs and strongly recommend
|
||||||
using those over external executables. For example, using the Amazon EC2 API
|
using those over external executables. For example, using the Amazon EC2 API
|
||||||
instead of the EC2 command line tools. If in doubt, contact a project
|
instead of the EC2 command line tools. If in doubt, contact a project
|
||||||
maintainer.
|
maintainer.
|
||||||
|
|
||||||
## SSH
|
## SSH
|
||||||
|
|
||||||
The provider must offer SSH access to control the instance. This does not
|
The provider must offer SSH access to control the instance. This does not
|
||||||
have to be public, but must offer it as Machine relies on SSH for system
|
have to be public, but must offer it as Machine relies on SSH for system
|
||||||
level maintenance.
|
level maintenance.
|
||||||
|
|
||||||
# Provider Operations
|
# Provider Operations
|
||||||
|
|
||||||
The following instance operations should be supported by the provider.
|
The following instance operations should be supported by the provider.
|
||||||
|
|
||||||
## Create
|
## Create
|
||||||
|
|
||||||
`Create` will launch a new instance and make sure it is ready for provisioning.
|
`Create` will launch a new instance and make sure it is ready for provisioning.
|
||||||
This includes setting up the instance with the proper SSH keys and making
|
This includes setting up the instance with the proper SSH keys and making
|
||||||
sure SSH is available including any access control (firewall). This should
|
sure SSH is available including any access control (firewall). This should
|
||||||
return an error on failure.
|
return an error on failure.
|
||||||
|
|
||||||
## Remove
|
## Remove
|
||||||
|
|
||||||
`Remove` will remove the instance from the provider. This should remove the
|
`Remove` will remove the instance from the provider. This should remove the
|
||||||
instance and any associated services or artifacts that were created as part
|
instance and any associated services or artifacts that were created as part
|
||||||
of the instance including keys and access groups. This should return an
|
of the instance including keys and access groups. This should return an
|
||||||
error on failure.
|
error on failure.
|
||||||
|
|
||||||
## Start
|
## Start
|
||||||
|
|
||||||
`Start` will start a stopped instance. This should ensure the instance is
|
`Start` will start a stopped instance. This should ensure the instance is
|
||||||
ready for operations such as SSH and Docker. This should return an error on
|
ready for operations such as SSH and Docker. This should return an error on
|
||||||
failure.
|
failure.
|
||||||
|
|
||||||
## Stop
|
## Stop
|
||||||
|
|
||||||
`Stop` will stop a running instance. This should ensure the instance is
|
`Stop` will stop a running instance. This should ensure the instance is
|
||||||
stopped and return an error on failure.
|
stopped and return an error on failure.
|
||||||
|
|
||||||
## Kill
|
## Kill
|
||||||
|
|
||||||
`Kill` will forcibly stop a running instance. This should ensure the instance
|
`Kill` will forcibly stop a running instance. This should ensure the instance
|
||||||
is stopped and return an error on failure.
|
is stopped and return an error on failure.
|
||||||
|
|
||||||
## Restart
|
## Restart
|
||||||
|
|
||||||
`Restart` will restart a running instance. This should ensure the instance
|
`Restart` will restart a running instance. This should ensure the instance
|
||||||
is ready for operations such as SSH and Docker. This should return an error
|
is ready for operations such as SSH and Docker. This should return an error
|
||||||
on failure.
|
on failure.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
`Status` will return the state of the instance. This should return the
|
`Status` will return the state of the instance. This should return the
|
||||||
current state of the instance (running, stopped, error, etc). This should
|
current state of the instance (running, stopped, error, etc). This should
|
||||||
return an error on failure.
|
return an error on failure.
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
|
||||||
Testing is strongly recommended for drivers. Unit tests are preferred as well
|
Testing is strongly recommended for drivers. Unit tests are preferred as well
|
||||||
as inclusion into the [integration tests](https://github.com/docker/machine#integration-tests).
|
as inclusion into the [integration tests](https://github.com/docker/machine#integration-tests).
|
||||||
|
|
||||||
# Maintaining
|
# Maintaining
|
||||||
|
|
||||||
Driver plugin maintainers are encouraged to host their own repo and distribute
|
Driver plugin maintainers are encouraged to host their own repo and distribute
|
||||||
the driver plugins as executables.
|
the driver plugins as executables.
|
||||||
|
|
||||||
# Implementation
|
# Implementation
|
||||||
|
|
||||||
The following describes what is needed to create a Machine Driver. The driver
|
The following describes what is needed to create a Machine Driver. The driver
|
||||||
interface has methods that must be implemented for all drivers. These include
|
interface has methods that must be implemented for all drivers. These include
|
||||||
operations such as `Create`, `Remove`, `Start`, `Stop` etc.
|
operations such as `Create`, `Remove`, `Start`, `Stop` etc.
|
||||||
|
@ -91,29 +107,25 @@ For details see the [Driver Interface](https://github.com/docker/machine/blob/ma
|
||||||
|
|
||||||
To provide this functionality, you should embed the `drivers.BaseDriver` struct, similar to the following:
|
To provide this functionality, you should embed the `drivers.BaseDriver` struct, similar to the following:
|
||||||
|
|
||||||
```
|
|
||||||
type Driver struct {
|
type Driver struct {
|
||||||
*drivers.BaseDriver
|
*drivers.BaseDriver
|
||||||
DriverSpecificField string
|
DriverSpecificField string
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
Each driver must then use an `init` func to "register" the driver:
|
Each driver must then use an `init` func to "register" the driver:
|
||||||
|
|
||||||
```
|
|
||||||
func init() {
|
func init() {
|
||||||
drivers.Register("drivername", &drivers.RegisteredDriver{
|
drivers.Register("drivername", &drivers.RegisteredDriver{
|
||||||
New: NewDriver,
|
New: NewDriver,
|
||||||
GetCreateFlags: GetCreateFlags,
|
GetCreateFlags: GetCreateFlags,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
Driver flags are used for provider specific customizations. To add flags, use
|
Driver flags are used for provider specific customizations. To add flags, use
|
||||||
a `GetCreateFlags` func. For example:
|
a `GetCreateFlags` func. For example:
|
||||||
|
|
||||||
```
|
|
||||||
func GetCreateFlags() []cli.Flag {
|
func GetCreateFlags() []cli.Flag {
|
||||||
return []cli.Flag{
|
return []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
@ -130,8 +142,8 @@ func GetCreateFlags() []cli.Flag {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
You can reference the existing [Drivers](https://github.com/docker/machine/tree/master/drivers)
|
You can reference the existing [Drivers](https://github.com/docker/machine/tree/master/drivers)
|
||||||
as well.
|
as well.
|
||||||
|
|
|
@ -25,9 +25,9 @@ If you want to add a new file or change the location of the document in the menu
|
||||||
|
|
||||||
All check lines you've written. Don't wrap content you didn't change material.
|
All check lines you've written. Don't wrap content you didn't change material.
|
||||||
|
|
||||||
3. Make sure you are in the `docs` subdirectory.
|
4. Make sure you are in the `docs` subdirectory.
|
||||||
|
|
||||||
4. Build the documentation.
|
5. Build the documentation.
|
||||||
|
|
||||||
$ make docs
|
$ make docs
|
||||||
---> ffcf3f6c4e97
|
---> ffcf3f6c4e97
|
||||||
|
@ -46,7 +46,7 @@ If you want to add a new file or change the location of the document in the menu
|
||||||
Web Server is available at http://0.0.0.0:8000/
|
Web Server is available at http://0.0.0.0:8000/
|
||||||
Press Ctrl+C to stop
|
Press Ctrl+C to stop
|
||||||
|
|
||||||
5. Open the available server in your browser.
|
6. Open the available server in your browser.
|
||||||
|
|
||||||
The documentation server has the complete menu but only the Docker machine
|
The documentation server has the complete menu but only the Docker machine
|
||||||
documentation resolves. You can't access the other project docs from this
|
documentation resolves. You can't access the other project docs from this
|
||||||
|
@ -78,11 +78,10 @@ The metadata alone has this structure:
|
||||||
weight=2
|
weight=2
|
||||||
+++
|
+++
|
||||||
|
|
||||||
The `[menu.main]` section refers to navigation defined [in the main Docker menu](https://github.com/docker/docs-base/blob/hugo/config.toml). This metadata says *add a menu item called* Extending services in machine *to the menu with the* `smn_workdw_machine` *identifier*. If you locate the menu in the configuration, you'll find *Create multi-container applications* is the menu title.
|
The `[menu.main]` section refers to navigation defined [in the main Docker menu](https://github.com/docker/docs-base/blob/hugo/config.toml). This metadata says _add a menu item called_ Extending services in machine _to the menu with the_ `smn_workdw_machine` _identifier_. If you locate the menu in the configuration, you'll find _Create multi-container applications_ is the menu title.
|
||||||
|
|
||||||
You can move an article in the tree by specifying a new parent. You can shift the location of the item by changing its weight. Higher numbers are heavier and shift the item to the bottom of menu. Low or no numbers shift it up.
|
You can move an article in the tree by specifying a new parent. You can shift the location of the item by changing its weight. Higher numbers are heavier and shift the item to the bottom of menu. Low or no numbers shift it up.
|
||||||
|
|
||||||
|
|
||||||
## Other key documentation repositories
|
## Other key documentation repositories
|
||||||
|
|
||||||
The `docker/docs-base` repository contains [the Hugo theme and menu configuration](https://github.com/docker/docs-base). If you open the `Dockerfile` you'll see the `make docs` relies on this as a base image for building the machine documentation.
|
The `docker/docs-base` repository contains [the Hugo theme and menu configuration](https://github.com/docker/docs-base). If you open the `Dockerfile` you'll see the `make docs` relies on this as a base image for building the machine documentation.
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Amazon Web Services
|
# Amazon Web Services
|
||||||
|
|
||||||
Create machines on [Amazon Web Services](http://aws.amazon.com). To create machines on [Amazon Web Services](http://aws.amazon.com), you must supply three required parameters:
|
Create machines on [Amazon Web Services](http://aws.amazon.com). To create machines on [Amazon Web Services](http://aws.amazon.com), you must supply three required parameters:
|
||||||
|
|
||||||
- Access Key ID
|
- Access Key ID
|
||||||
|
@ -19,20 +20,17 @@ Obtain your IDs and Keys from AWS. To find the VPC ID:
|
||||||
|
|
||||||
1. Login to the AWS console
|
1. Login to the AWS console
|
||||||
2. Go to **Services -> VPC -> Your VPCs**.
|
2. Go to **Services -> VPC -> Your VPCs**.
|
||||||
3. Locate the VPC ID you want from the *VPC* column.
|
3. Locate the VPC ID you want from the _VPC_ column.
|
||||||
4. Go to **Services -> VPC -> Subnets**. Examine the *Availability Zone* column to verify that zone `a` exists and matches your VPC ID.
|
4. Go to **Services -> VPC -> Subnets**. Examine the _Availability Zone_ column to verify that zone `a` exists and matches your VPC ID.
|
||||||
|
|
||||||
For example, `us-east1-a` is in the `a` availability zone. If the `a` zone is not present, you can create a new subnet in that zone or specify a different zone when you create the machine.
|
For example, `us-east1-a` is in the `a` availability zone. If the `a` zone is not present, you can create a new subnet in that zone or specify a different zone when you create the machine.
|
||||||
|
|
||||||
To create the machine instance, specify `--driver amazonec2` and the three required parameters.
|
To create the machine instance, specify `--driver amazonec2` and the three required parameters.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create --driver amazonec2 --amazonec2-access-key AKI******* --amazonec2-secret-key 8T93C********* --amazonec2-vpc-id vpc-****** aws01
|
$ docker-machine create --driver amazonec2 --amazonec2-access-key AKI******* --amazonec2-secret-key 8T93C********* --amazonec2-vpc-id vpc-****** aws01
|
||||||
```
|
|
||||||
|
|
||||||
This example assumes the VPC ID was found in the `a` availability zone. Use the`--amazonec2-zone` flag to specify a zone other than the `a` zone. For example, `--amazonec2-zone c` signifies `us-east1-c`.
|
This example assumes the VPC ID was found in the `a` availability zone. Use the`--amazonec2-zone` flag to specify a zone other than the `a` zone. For example, `--amazonec2-zone c` signifies `us-east1-c`.
|
||||||
|
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
- `--amazonec2-access-key`: **required** Your access key id for the Amazon Web Services API.
|
- `--amazonec2-access-key`: **required** Your access key id for the Amazon Web Services API.
|
||||||
|
@ -56,7 +54,7 @@ This example assumes the VPC ID was found in the `a` availability zone. Use the`
|
||||||
By default, the Amazon EC2 driver will use a daily image of Ubuntu 14.04 LTS.
|
By default, the Amazon EC2 driver will use a daily image of Ubuntu 14.04 LTS.
|
||||||
|
|
||||||
| Region | AMI ID |
|
| Region | AMI ID |
|
||||||
|----------------|--------------|
|
| -------------- | ------------ |
|
||||||
| ap-northeast-1 | ami-f4b06cf4 |
|
| ap-northeast-1 | ami-f4b06cf4 |
|
||||||
| ap-southeast-1 | ami-b899a2ea |
|
| ap-southeast-1 | ami-b899a2ea |
|
||||||
| ap-southeast-2 | ami-b59ce48f |
|
| ap-southeast-2 | ami-b59ce48f |
|
||||||
|
@ -72,7 +70,7 @@ By default, the Amazon EC2 driver will use a daily image of Ubuntu 14.04 LTS.
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|-------------------------------------|-------------------------|------------------|
|
| ----------------------------------- | ----------------------- | ---------------- |
|
||||||
| **`--amazonec2-access-key`** | `AWS_ACCESS_KEY_ID` | - |
|
| **`--amazonec2-access-key`** | `AWS_ACCESS_KEY_ID` | - |
|
||||||
| **`--amazonec2-secret-key`** | `AWS_SECRET_ACCESS_KEY` | - |
|
| **`--amazonec2-secret-key`** | `AWS_SECRET_ACCESS_KEY` | - |
|
||||||
| `--amazonec2-session-token` | `AWS_SESSION_TOKEN` | - |
|
| `--amazonec2-session-token` | `AWS_SESSION_TOKEN` | - |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Microsoft Azure
|
# Microsoft Azure
|
||||||
|
|
||||||
Create machines on [Microsoft Azure](http://azure.microsoft.com/).
|
Create machines on [Microsoft Azure](http://azure.microsoft.com/).
|
||||||
|
|
||||||
You need to create a subscription with a cert. Run these commands and answer the questions:
|
You need to create a subscription with a cert. Run these commands and answer the questions:
|
||||||
|
@ -46,9 +47,9 @@ Options:
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|---------------------------------|-------------------------------| ----------------------|
|
| ------------------------------- | ----------------------------- | ---------------------- |
|
||||||
| `--azure-docker-port` | - | `2376` |
|
| `--azure-docker-port` | - | `2376` |
|
||||||
| `--azure-image` | `AZURE_IMAGE` | *Ubuntu 14.04 LTS x64*|
|
| `--azure-image` | `AZURE_IMAGE` | _Ubuntu 14.04 LTS x64_ |
|
||||||
| `--azure-location` | `AZURE_LOCATION` | `West US` |
|
| `--azure-location` | `AZURE_LOCATION` | `West US` |
|
||||||
| `--azure-password` | - | - |
|
| `--azure-password` | - | - |
|
||||||
| `--azure-publish-settings-file` | `AZURE_PUBLISH_SETTINGS_FILE` | - |
|
| `--azure-publish-settings-file` | `AZURE_PUBLISH_SETTINGS_FILE` | - |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Digital Ocean
|
# Digital Ocean
|
||||||
|
|
||||||
Create Docker machines on [Digital Ocean](https://www.digitalocean.com/).
|
Create Docker machines on [Digital Ocean](https://www.digitalocean.com/).
|
||||||
|
|
||||||
You need to create a personal access token under "Apps & API" in the Digital Ocean
|
You need to create a personal access token under "Apps & API" in the Digital Ocean
|
||||||
|
@ -31,7 +32,7 @@ The DigitalOcean driver will use `ubuntu-14-04-x64` as the default image.
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|-------------------------------------|-----------------------------------|----------|
|
| ----------------------------------- | --------------------------------- | -------- |
|
||||||
| **`--digitalocean-access-token`** | `DIGITALOCEAN_ACCESS_TOKEN` | - |
|
| **`--digitalocean-access-token`** | `DIGITALOCEAN_ACCESS_TOKEN` | - |
|
||||||
| `--digitalocean-image` | `DIGITALOCEAN_IMAGE` | `docker` |
|
| `--digitalocean-image` | `DIGITALOCEAN_IMAGE` | `docker` |
|
||||||
| `--digitalocean-region` | `DIGITALOCEAN_REGION` | `nyc3` |
|
| `--digitalocean-region` | `DIGITALOCEAN_REGION` | `nyc3` |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Exoscale
|
# Exoscale
|
||||||
|
|
||||||
Create machines on [exoscale](https://www.exoscale.ch/).
|
Create machines on [exoscale](https://www.exoscale.ch/).
|
||||||
|
|
||||||
Get your API key and API secret key from [API details](https://portal.exoscale.ch/account/api) and pass them to `machine create` with the `--exoscale-api-key` and `--exoscale-api-secret-key` options.
|
Get your API key and API secret key from [API details](https://portal.exoscale.ch/account/api) and pass them to `machine create` with the `--exoscale-api-key` and `--exoscale-api-secret-key` options.
|
||||||
|
@ -29,7 +30,7 @@ If a custom security group is provided, you need to ensure that you allow TCP po
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|---------------------------------|------------------------------|-----------------------------------|
|
| ------------------------------- | ---------------------------- | --------------------------------- |
|
||||||
| `--exoscale-url` | `EXOSCALE_ENDPOINT` | `https://api.exoscale.ch/compute` |
|
| `--exoscale-url` | `EXOSCALE_ENDPOINT` | `https://api.exoscale.ch/compute` |
|
||||||
| **`--exoscale-api-key`** | `EXOSCALE_API_KEY` | - |
|
| **`--exoscale-api-key`** | `EXOSCALE_API_KEY` | - |
|
||||||
| **`--exoscale-api-secret-key`** | `EXOSCALE_API_SECRET` | - |
|
| **`--exoscale-api-secret-key`** | `EXOSCALE_API_SECRET` | - |
|
||||||
|
|
|
@ -12,7 +12,7 @@ parent="smn_machine_drivers"
|
||||||
|
|
||||||
Create machines on [Google Compute Engine](https://cloud.google.com/compute/).
|
Create machines on [Google Compute Engine](https://cloud.google.com/compute/).
|
||||||
You will need a Google account and a project id.
|
You will need a Google account and a project id.
|
||||||
See https://cloud.google.com/compute/docs/projects for details on projects.
|
See <https://cloud.google.com/compute/docs/projects> for details on projects.
|
||||||
|
|
||||||
### Credentials
|
### Credentials
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ through the oauth2 process with `gcloud auth login`.
|
||||||
|
|
||||||
To create a machine instance, specify `--driver google`, the project id and the machine name.
|
To create a machine instance, specify `--driver google`, the project id and the machine name.
|
||||||
|
|
||||||
```
|
|
||||||
$ gcloud auth login
|
$ gcloud auth login
|
||||||
$ docker-machine create --driver google --google-project PROJECT_ID vm01
|
$ docker-machine create --driver google --google-project PROJECT_ID vm01
|
||||||
$ docker-machine create --driver google \
|
$ docker-machine create --driver google \
|
||||||
|
@ -36,7 +35,6 @@ $ docker-machine create --driver google \
|
||||||
--google-zone us-central1-a \
|
--google-zone us-central1-a \
|
||||||
--google-machine-type f1-micro \
|
--google-machine-type f1-micro \
|
||||||
vm02
|
vm02
|
||||||
```
|
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
|
@ -55,14 +53,13 @@ $ docker-machine create --driver google \
|
||||||
|
|
||||||
The GCE driver will use the `ubuntu-1404-trusty-v20151113` instance image unless otherwise specified. To obtain a
|
The GCE driver will use the `ubuntu-1404-trusty-v20151113` instance image unless otherwise specified. To obtain a
|
||||||
list of image URLs run:
|
list of image URLs run:
|
||||||
```
|
|
||||||
gcloud compute images list --uri
|
gcloud compute images list --uri
|
||||||
```
|
|
||||||
|
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|----------------------------|--------------------------|--------------------------------------|
|
| -------------------------- | ------------------------ | ------------------------------------ |
|
||||||
| **`--google-project`** | `GOOGLE_PROJECT` | - |
|
| **`--google-project`** | `GOOGLE_PROJECT` | - |
|
||||||
| `--google-zone` | `GOOGLE_ZONE` | `us-central1-a` |
|
| `--google-zone` | `GOOGLE_ZONE` | `us-central1-a` |
|
||||||
| `--google-machine-type` | `GOOGLE_MACHINE_TYPE` | `f1-standard-1` |
|
| `--google-machine-type` | `GOOGLE_MACHINE_TYPE` | `f1-standard-1` |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Microsoft Hyper-V
|
# Microsoft Hyper-V
|
||||||
|
|
||||||
Creates a Boot2Docker virtual machine locally on your Windows machine
|
Creates a Boot2Docker virtual machine locally on your Windows machine
|
||||||
using Hyper-V. [See here](http://windows.microsoft.com/en-us/windows-8/hyper-v-run-virtual-machines)
|
using Hyper-V. [See here](http://windows.microsoft.com/en-us/windows-8/hyper-v-run-virtual-machines)
|
||||||
for instructions to enable Hyper-V. You will need to use an
|
for instructions to enable Hyper-V. You will need to use an
|
||||||
|
@ -32,9 +33,9 @@ Options:
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|----------------------------------|----------------------| -------------------------|
|
| ------------------------------- | -------------------- | ------------------------ |
|
||||||
| `--hyperv-boot2docker-url` | - | *Latest boot2docker url* |
|
| `--hyperv-boot2docker-url` | - | _Latest boot2docker url_ |
|
||||||
| `--hyperv-boot2docker-location` | - | - |
|
| `--hyperv-boot2docker-location` | - | - |
|
||||||
| `--hyperv-virtual-switch` | - | *first found* |
|
| `--hyperv-virtual-switch` | - | _first found_ |
|
||||||
| `--hyperv-disk-size` | - | `20000` |
|
| `--hyperv-disk-size` | - | `20000` |
|
||||||
| `--hyperv-memory` | - | `1024` |
|
| `--hyperv-memory` | - | `1024` |
|
||||||
|
|
|
@ -11,17 +11,17 @@ identifier="smn_machine_drivers"
|
||||||
|
|
||||||
# Supported Drivers
|
# Supported Drivers
|
||||||
|
|
||||||
* [Amazon Web Services](aws.md)
|
- [Amazon Web Services](aws.md)
|
||||||
* [Microsoft Azure](azure.md)
|
- [Microsoft Azure](azure.md)
|
||||||
* [Digital Ocean](digital-ocean.md)
|
- [Digital Ocean](digital-ocean.md)
|
||||||
* [Exoscale](exoscale.md)
|
- [Exoscale](exoscale.md)
|
||||||
* [Google Compute Engine](gce.md)
|
- [Google Compute Engine](gce.md)
|
||||||
* [Generic](generic.md)
|
- [Generic](generic.md)
|
||||||
* [Microsoft Hyper-V](hyper-v.md)
|
- [Microsoft Hyper-V](hyper-v.md)
|
||||||
* [OpenStack](openstack.md)
|
- [OpenStack](openstack.md)
|
||||||
* [Rackspace](rackspace.md)
|
- [Rackspace](rackspace.md)
|
||||||
* [IBM Softlayer](soft-layer.md)
|
- [IBM Softlayer](soft-layer.md)
|
||||||
* [Oracle VirtualBox](virtualbox.md)
|
- [Oracle VirtualBox](virtualbox.md)
|
||||||
* [VMware vCloud Air](vm-cloud.md)
|
- [VMware vCloud Air](vm-cloud.md)
|
||||||
* [VMware Fusion](vm-fusion.md)
|
- [VMware Fusion](vm-fusion.md)
|
||||||
* [VMware vSphere](vsphere.md)
|
- [VMware vSphere](vsphere.md)
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# OpenStack
|
# OpenStack
|
||||||
|
|
||||||
Create machines on [OpenStack](http://www.openstack.org/software/)
|
Create machines on [OpenStack](http://www.openstack.org/software/)
|
||||||
|
|
||||||
Mandatory:
|
Mandatory:
|
||||||
|
@ -42,7 +43,7 @@ Options:
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|----------------------------------|------------------------|-------------|
|
| ------------------------------- | ---------------------- | ----------- |
|
||||||
| `--openstack-auth-url` | `OS_AUTH_URL` | - |
|
| `--openstack-auth-url` | `OS_AUTH_URL` | - |
|
||||||
| `--openstack-flavor-name` | `OS_FLAVOR_NAME` | - |
|
| `--openstack-flavor-name` | `OS_FLAVOR_NAME` | - |
|
||||||
| `--openstack-flavor-id` | `OS_FLAVOR_ID` | - |
|
| `--openstack-flavor-id` | `OS_FLAVOR_ID` | - |
|
||||||
|
|
|
@ -37,7 +37,7 @@ so forth, the default base operating system is Boot2Docker. For cloud providers,
|
||||||
the base operating system is the latest Ubuntu LTS the provider supports.
|
the base operating system is the latest Ubuntu LTS the provider supports.
|
||||||
|
|
||||||
| Operating System | Version | Notes |
|
| Operating System | Version | Notes |
|
||||||
|----------------------------|------------------|-------------------------|
|
| ----------------------- | ------- | ------------------ |
|
||||||
| Boot2Docker | 1.5+ | default for local |
|
| Boot2Docker | 1.5+ | default for local |
|
||||||
| Ubuntu | 12.04+ | default for remote |
|
| Ubuntu | 12.04+ | default for remote |
|
||||||
| RancherOS | 0.3+ | |
|
| RancherOS | 0.3+ | |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Rackspace
|
# Rackspace
|
||||||
|
|
||||||
Create machines on [Rackspace cloud](http://www.rackspace.com/cloud)
|
Create machines on [Rackspace cloud](http://www.rackspace.com/cloud)
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
@ -28,7 +29,7 @@ The Rackspace driver will use `598a4282-f14b-4e50-af4c-b3e52749d9f9` (Ubuntu 14.
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|------------------------------|----------------------|----------------------------------------|
|
| ---------------------------- | -------------------- | -------------------------------------- |
|
||||||
| **`--rackspace-username`** | `OS_USERNAME` | - |
|
| **`--rackspace-username`** | `OS_USERNAME` | - |
|
||||||
| **`--rackspace-api-key`** | `OS_API_KEY` | - |
|
| **`--rackspace-api-key`** | `OS_API_KEY` | - |
|
||||||
| **`--rackspace-region`** | `OS_REGION_NAME` | - |
|
| **`--rackspace-region`** | `OS_REGION_NAME` | - |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# IBM Softlayer
|
# IBM Softlayer
|
||||||
|
|
||||||
Create machines on [Softlayer](http://softlayer.com).
|
Create machines on [Softlayer](http://softlayer.com).
|
||||||
|
|
||||||
You need to generate an API key in the softlayer control panel.
|
You need to generate an API key in the softlayer control panel.
|
||||||
|
@ -37,7 +38,7 @@ The SoftLayer driver will use `UBUNTU_LATEST` as the image type by default.
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|--------------------------------|-----------------------------|-----------------------------|
|
| ------------------------------ | --------------------------- | --------------------------- |
|
||||||
| `--softlayer-memory` | `SOFTLAYER_MEMORY` | `1024` |
|
| `--softlayer-memory` | `SOFTLAYER_MEMORY` | `1024` |
|
||||||
| `--softlayer-disk-size` | `SOFTLAYER_DISK_SIZE` | `0` |
|
| `--softlayer-disk-size` | `SOFTLAYER_DISK_SIZE` | `0` |
|
||||||
| **`--softlayer-user`** | `SOFTLAYER_USER` | - |
|
| **`--softlayer-user`** | `SOFTLAYER_USER` | - |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# Oracle VirtualBox
|
# Oracle VirtualBox
|
||||||
|
|
||||||
Create machines locally using [VirtualBox](https://www.virtualbox.org/).
|
Create machines locally using [VirtualBox](https://www.virtualbox.org/).
|
||||||
This driver requires VirtualBox 4+ to be installed on your host.
|
This driver requires VirtualBox 4+ to be installed on your host.
|
||||||
|
|
||||||
|
@ -20,7 +21,6 @@ command:
|
||||||
|
|
||||||
$ docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm b2d
|
$ docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm b2d
|
||||||
|
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
- `--virtualbox-memory`: Size of memory for the host in MB.
|
- `--virtualbox-memory`: Size of memory for the host in MB.
|
||||||
|
@ -62,11 +62,11 @@ upper bound of `192.168.24.254`.
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|--------------------------------------|------------------------------------|--------------------------|
|
| ------------------------------------ | ---------------------------------- | ------------------------ |
|
||||||
| `--virtualbox-memory` | `VIRTUALBOX_MEMORY_SIZE` | `1024` |
|
| `--virtualbox-memory` | `VIRTUALBOX_MEMORY_SIZE` | `1024` |
|
||||||
| `--virtualbox-cpu-count` | `VIRTUALBOX_CPU_COUNT` | `1` |
|
| `--virtualbox-cpu-count` | `VIRTUALBOX_CPU_COUNT` | `1` |
|
||||||
| `--virtualbox-disk-size` | `VIRTUALBOX_DISK_SIZE` | `20000` |
|
| `--virtualbox-disk-size` | `VIRTUALBOX_DISK_SIZE` | `20000` |
|
||||||
| `--virtualbox-boot2docker-url` | `VIRTUALBOX_BOOT2DOCKER_URL` | *Latest boot2docker url* |
|
| `--virtualbox-boot2docker-url` | `VIRTUALBOX_BOOT2DOCKER_URL` | _Latest boot2docker url_ |
|
||||||
| `--virtualbox-import-boot2docker-vm` | `VIRTUALBOX_BOOT2DOCKER_IMPORT_VM` | `boot2docker-vm` |
|
| `--virtualbox-import-boot2docker-vm` | `VIRTUALBOX_BOOT2DOCKER_IMPORT_VM` | `boot2docker-vm` |
|
||||||
| `--virtualbox-hostonly-cidr` | `VIRTUALBOX_HOSTONLY_CIDR` | `192.168.99.1/24` |
|
| `--virtualbox-hostonly-cidr` | `VIRTUALBOX_HOSTONLY_CIDR` | `192.168.99.1/24` |
|
||||||
| `--virtualbox-hostonly-nictype` | `VIRTUALBOX_HOSTONLY_NIC_TYPE` | `82540EM` |
|
| `--virtualbox-hostonly-nictype` | `VIRTUALBOX_HOSTONLY_NIC_TYPE` | `82540EM` |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# VMware vCloud Air
|
# VMware vCloud Air
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
@ -33,7 +34,7 @@ The VMware vCloud Air driver will use the `Ubuntu Server 12.04 LTS (amd64 201409
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|-----------------------------------|---------------------------|--------------------------------------------|
|
| --------------------------------- | ------------------------- | ------------------------------------------ |
|
||||||
| **`--vmwarevcloudair-username`** | `VCLOUDAIR_USERNAME` | - |
|
| **`--vmwarevcloudair-username`** | `VCLOUDAIR_USERNAME` | - |
|
||||||
| **`--vmwarevcloudair-password`** | `VCLOUDAIR_PASSWORD` | - |
|
| **`--vmwarevcloudair-password`** | `VCLOUDAIR_PASSWORD` | - |
|
||||||
| `--vmwarevcloudair-computeid` | `VCLOUDAIR_COMPUTEID` | - |
|
| `--vmwarevcloudair-computeid` | `VCLOUDAIR_COMPUTEID` | - |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# VMware Fusion
|
# VMware Fusion
|
||||||
|
|
||||||
Creates machines locally on [VMware Fusion](http://www.vmware.com/products/fusion). Requires VMware Fusion to be installed.
|
Creates machines locally on [VMware Fusion](http://www.vmware.com/products/fusion). Requires VMware Fusion to be installed.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
@ -25,8 +26,8 @@ See [frapposelli/boot2docker](https://github.com/frapposelli/boot2docker/tree/vm
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|----------------------------------|--------------------------|--------------------------|
|
| -------------------------------- | ------------------------ | ------------------------ |
|
||||||
| `--vmwarefusion-boot2docker-url` | `FUSION_BOOT2DOCKER_URL` | *Latest boot2docker url* |
|
| `--vmwarefusion-boot2docker-url` | `FUSION_BOOT2DOCKER_URL` | _Latest boot2docker url_ |
|
||||||
| `--vmwarefusion-cpu-count` | `FUSION_CPU_COUNT` | `1` |
|
| `--vmwarefusion-cpu-count` | `FUSION_CPU_COUNT` | `1` |
|
||||||
| `--vmwarefusion-disk-size` | `FUSION_DISK_SIZE` | `20000` |
|
| `--vmwarefusion-disk-size` | `FUSION_DISK_SIZE` | `20000` |
|
||||||
| `--vmwarefusion-memory-size` | `FUSION_MEMORY_SIZE` | `1024` |
|
| `--vmwarefusion-memory-size` | `FUSION_MEMORY_SIZE` | `1024` |
|
||||||
|
|
|
@ -9,6 +9,7 @@ parent="smn_machine_drivers"
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
# VMware vSphere
|
# VMware vSphere
|
||||||
|
|
||||||
Creates machines on a [VMware vSphere](http://www.vmware.com/products/vsphere) Virtual Infrastructure. The machine must have a working vSphere ESXi installation. You can use a paid license or free 60 day trial license. Your installation may also include an optional VCenter server. 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).
|
Creates machines on a [VMware vSphere](http://www.vmware.com/products/vsphere) Virtual Infrastructure. The machine must have a working vSphere ESXi installation. You can use a paid license or free 60 day trial license. Your installation may also include an optional VCenter server. 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).
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
@ -31,11 +32,11 @@ The VMware vSphere driver uses the latest boot2docker image.
|
||||||
Environment variables and default values:
|
Environment variables and default values:
|
||||||
|
|
||||||
| CLI option | Environment variable | Default |
|
| CLI option | Environment variable | Default |
|
||||||
|-----------------------------------|---------------------------|--------------------------|
|
| --------------------------------- | ------------------------- | ------------------------ |
|
||||||
| `--vmwarevsphere-cpu-count` | `VSPHERE_CPU_COUNT` | `2` |
|
| `--vmwarevsphere-cpu-count` | `VSPHERE_CPU_COUNT` | `2` |
|
||||||
| `--vmwarevsphere-memory-size` | `VSPHERE_MEMORY_SIZE` | `2048` |
|
| `--vmwarevsphere-memory-size` | `VSPHERE_MEMORY_SIZE` | `2048` |
|
||||||
| `--vmwarevsphere-disk-size` | `VSPHERE_DISK_SIZE` | `20000` |
|
| `--vmwarevsphere-disk-size` | `VSPHERE_DISK_SIZE` | `20000` |
|
||||||
| `--vmwarevsphere-boot2docker-url` | `VSPHERE_BOOT2DOCKER_URL` | *Latest boot2docker url* |
|
| `--vmwarevsphere-boot2docker-url` | `VSPHERE_BOOT2DOCKER_URL` | _Latest boot2docker url_ |
|
||||||
| `--vmwarevsphere-vcenter` | `VSPHERE_VCENTER` | - |
|
| `--vmwarevsphere-vcenter` | `VSPHERE_VCENTER` | - |
|
||||||
| **`--vmwarevsphere-username`** | `VSPHERE_USERNAME` | - |
|
| **`--vmwarevsphere-username`** | `VSPHERE_USERNAME` | - |
|
||||||
| **`--vmwarevsphere-password`** | `VSPHERE_PASSWORD` | - |
|
| **`--vmwarevsphere-password`** | `VSPHERE_PASSWORD` | - |
|
||||||
|
|
|
@ -41,7 +41,6 @@ the `--digitalocean-access-token` flag.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create \
|
$ docker-machine create \
|
||||||
--driver digitalocean \
|
--driver digitalocean \
|
||||||
--digitalocean-access-token 0ab77166d407f479c6701652cee3a46830fef88b8199722b87821621736ab2d4 \
|
--digitalocean-access-token 0ab77166d407f479c6701652cee3a46830fef88b8199722b87821621736ab2d4 \
|
||||||
|
@ -49,7 +48,6 @@ $ docker-machine create \
|
||||||
Creating SSH key...
|
Creating SSH key...
|
||||||
Creating Digital Ocean droplet...
|
Creating Digital Ocean droplet...
|
||||||
To see how to connect Docker to this machine, run: docker-machine env staging
|
To see how to connect Docker to this machine, run: docker-machine env staging
|
||||||
```
|
|
||||||
|
|
||||||
For convenience, `docker-machine` will use sensible defaults for choosing
|
For convenience, `docker-machine` will use sensible defaults for choosing
|
||||||
settings such as the image that the VPS is based on, but they can also be
|
settings such as the image that the VPS is based on, but they can also be
|
||||||
|
@ -70,28 +68,22 @@ is finished, the host is ready for connection.
|
||||||
To prepare the Docker client to send commands to the remote server we have
|
To prepare the Docker client to send commands to the remote server we have
|
||||||
created, we can use the subshell method again:
|
created, we can use the subshell method again:
|
||||||
|
|
||||||
```
|
|
||||||
$ eval "$(docker-machine env staging)"
|
$ eval "$(docker-machine env staging)"
|
||||||
```
|
|
||||||
|
|
||||||
From this point, the remote host behaves much like the local host we created in
|
From this point, the remote host behaves much like the local host we created in
|
||||||
the last section. If we look at `docker-machine ls`, we'll see it is now the
|
the last section. If we look at `docker-machine ls`, we'll see it is now the
|
||||||
"active" host, indicated by an asterisk (`*`) in that column:
|
"active" host, indicated by an asterisk (`*`) in that column:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
dev - virtualbox Running tcp://192.168.99.103:2376
|
dev - virtualbox Running tcp://192.168.99.103:2376
|
||||||
staging * digitalocean Running tcp://104.236.50.118:2376
|
staging * digitalocean Running tcp://104.236.50.118:2376
|
||||||
```
|
|
||||||
|
|
||||||
To remove a host and all of its containers and images, use `docker-machine rm`:
|
To remove a host and all of its containers and images, use `docker-machine rm`:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine rm dev staging
|
$ docker-machine rm dev staging
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
```
|
|
||||||
|
|
||||||
## Adding a host without a driver
|
## Adding a host without a driver
|
||||||
|
|
||||||
|
@ -99,14 +91,13 @@ You can add a host to Docker which only has a URL and no driver. Therefore it
|
||||||
can be used an alias for an existing host so you don’t have to type out the URL
|
can be used an alias for an existing host so you don’t have to type out the URL
|
||||||
every time you run a Docker command.
|
every time you run a Docker command.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create --url=tcp://50.134.234.20:2376 custombox
|
$ docker-machine create --url=tcp://50.134.234.20:2376 custombox
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
custombox * none Running tcp://50.134.234.20:2376
|
custombox * none Running tcp://50.134.234.20:2376
|
||||||
```
|
|
||||||
|
|
||||||
## Using Docker Machine with Docker Swarm
|
## Using Docker Machine with Docker Swarm
|
||||||
|
|
||||||
Docker Machine can also provision [Swarm](https://github.com/docker/swarm)
|
Docker Machine can also provision [Swarm](https://github.com/docker/swarm)
|
||||||
clusters. This can be used with any driver and will be secured with TLS.
|
clusters. This can be used with any driver and will be secured with TLS.
|
||||||
|
|
||||||
|
@ -115,36 +106,29 @@ See the Swarm docs for details.
|
||||||
|
|
||||||
To create the token, first create a Machine. This example will use VirtualBox.
|
To create the token, first create a Machine. This example will use VirtualBox.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create -d virtualbox local
|
$ docker-machine create -d virtualbox local
|
||||||
```
|
|
||||||
|
|
||||||
Load the Machine configuration into your shell:
|
Load the Machine configuration into your shell:
|
||||||
|
|
||||||
```
|
|
||||||
$ eval "$(docker-machine env local)"
|
$ eval "$(docker-machine env local)"
|
||||||
```
|
|
||||||
|
|
||||||
Then run generate the token using the Swarm Docker image:
|
Then run generate the token using the Swarm Docker image:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker run swarm create
|
$ docker run swarm create
|
||||||
1257e0f0bbb499b5cd04b4c9bdb2dab3
|
1257e0f0bbb499b5cd04b4c9bdb2dab3
|
||||||
```
|
|
||||||
Once you have the token, you can create the cluster.
|
Once you have the token, you can create the cluster.
|
||||||
|
|
||||||
### Swarm master
|
### Swarm master
|
||||||
|
|
||||||
Create the Swarm master:
|
Create the Swarm master:
|
||||||
|
|
||||||
```
|
|
||||||
docker-machine create \
|
docker-machine create \
|
||||||
-d virtualbox \
|
-d virtualbox \
|
||||||
--swarm \
|
--swarm \
|
||||||
--swarm-master \
|
--swarm-master \
|
||||||
--swarm-discovery token://<TOKEN-FROM-ABOVE> \
|
--swarm-discovery token://<TOKEN-FROM-ABOVE> \
|
||||||
swarm-master
|
swarm-master
|
||||||
```
|
|
||||||
|
|
||||||
Replace `<TOKEN-FROM-ABOVE>` with your random token.
|
Replace `<TOKEN-FROM-ABOVE>` with your random token.
|
||||||
This will create the Swarm master and add itself as a Swarm node.
|
This will create the Swarm master and add itself as a Swarm node.
|
||||||
|
@ -153,32 +137,27 @@ This will create the Swarm master and add itself as a Swarm node.
|
||||||
|
|
||||||
Now, create more Swarm nodes:
|
Now, create more Swarm nodes:
|
||||||
|
|
||||||
```
|
|
||||||
docker-machine create \
|
docker-machine create \
|
||||||
-d virtualbox \
|
-d virtualbox \
|
||||||
--swarm \
|
--swarm \
|
||||||
--swarm-discovery token://<TOKEN-FROM-ABOVE> \
|
--swarm-discovery token://<TOKEN-FROM-ABOVE> \
|
||||||
swarm-node-00
|
swarm-node-00
|
||||||
```
|
|
||||||
|
|
||||||
You now have a Swarm cluster across two nodes.
|
You now have a Swarm cluster across two nodes.
|
||||||
To connect to the Swarm master, use `eval $(docker-machine env --swarm swarm-master)`
|
To connect to the Swarm master, use `eval $(docker-machine env --swarm swarm-master)`
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine env --swarm swarm-master
|
$ docker-machine env --swarm swarm-master
|
||||||
export DOCKER_TLS_VERIFY=1
|
export DOCKER_TLS_VERIFY=1
|
||||||
export DOCKER_CERT_PATH="/home/ehazlett/.docker/machines/.client"
|
export DOCKER_CERT_PATH="/home/ehazlett/.docker/machines/.client"
|
||||||
export DOCKER_HOST=tcp://192.168.99.100:3376
|
export DOCKER_HOST=tcp://192.168.99.100:3376
|
||||||
```
|
|
||||||
|
|
||||||
You can load this into your environment using
|
You can load this into your environment using
|
||||||
`eval "$(docker-machine env --swarm swarm-master)"`.
|
`eval "$(docker-machine env --swarm swarm-master)"`.
|
||||||
|
|
||||||
Now you can use the Docker CLI to query:
|
Now you can use the Docker CLI to query:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker info
|
$ docker info
|
||||||
Containers: 1
|
Containers: 1
|
||||||
Nodes: 1
|
Nodes: 1
|
||||||
|
@ -186,4 +165,3 @@ Nodes: 1
|
||||||
└ Containers: 2
|
└ Containers: 2
|
||||||
└ Reserved CPUs: 0 / 4
|
└ Reserved CPUs: 0 / 4
|
||||||
└ Reserved Memory: 0 B / 999.9 MiB
|
└ Reserved Memory: 0 B / 999.9 MiB
|
||||||
```
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ weight=1
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
|
|
||||||
# Get started with Docker Machine and a local VM
|
# Get started with Docker Machine and a local VM
|
||||||
|
|
||||||
Let's take a look at using `docker-machine` for creating, using, and managing a
|
Let's take a look at using `docker-machine` for creating, using, and managing a
|
||||||
|
@ -22,10 +21,8 @@ your system.
|
||||||
If you run the `docker-machine ls` command to show all available machines, you will see
|
If you run the `docker-machine ls` command to show all available machines, you will see
|
||||||
that none have been created so far.
|
that none have been created so far.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
```
|
|
||||||
|
|
||||||
To create one, we run the `docker-machine create` command, passing the string
|
To create one, we run the `docker-machine create` command, passing the string
|
||||||
`virtualbox` to the `--driver` flag. The final argument we pass is the name of
|
`virtualbox` to the `--driver` flag. The final argument we pass is the name of
|
||||||
|
@ -35,8 +32,6 @@ This command will download a lightweight Linux distribution
|
||||||
([boot2docker](https://github.com/boot2docker/boot2docker)) with the Docker
|
([boot2docker](https://github.com/boot2docker/boot2docker)) with the Docker
|
||||||
daemon installed, and will create and start a VirtualBox VM with Docker running.
|
daemon installed, and will create and start a VirtualBox VM with Docker running.
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create --driver virtualbox dev
|
$ docker-machine create --driver virtualbox dev
|
||||||
Creating CA: /home/username/.docker/machine/certs/ca.pem
|
Creating CA: /home/username/.docker/machine/certs/ca.pem
|
||||||
Creating client certificate: /home/username/.docker/machine/certs/cert.pem
|
Creating client certificate: /home/username/.docker/machine/certs/cert.pem
|
||||||
|
@ -48,25 +43,20 @@ Creating SSH key...
|
||||||
Starting VirtualBox VM...
|
Starting VirtualBox VM...
|
||||||
Starting VM...
|
Starting VM...
|
||||||
To see how to connect Docker to this machine, run: docker-machine env dev
|
To see how to connect Docker to this machine, run: docker-machine env dev
|
||||||
```
|
|
||||||
|
|
||||||
You can see the machine you have created by running the `docker-machine ls`
|
You can see the machine you have created by running the `docker-machine ls`
|
||||||
command again:
|
command again:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL SWARM
|
NAME ACTIVE DRIVER STATE URL SWARM
|
||||||
dev - virtualbox Running tcp://192.168.99.100:2376
|
dev - virtualbox Running tcp://192.168.99.100:2376
|
||||||
```
|
|
||||||
|
|
||||||
Next, as noted in the output of the `docker-machine create` command, we have to
|
Next, as noted in the output of the `docker-machine create` command, we have to
|
||||||
tell Docker to talk to that machine. You can do this with the `docker-machine
|
tell Docker to talk to that machine. You can do this with the `docker-machine
|
||||||
env` command. For example,
|
env` command. For example,
|
||||||
|
|
||||||
```
|
|
||||||
$ eval "$(docker-machine env dev)"
|
$ eval "$(docker-machine env dev)"
|
||||||
$ docker ps
|
$ docker ps
|
||||||
```
|
|
||||||
|
|
||||||
> **Note**: If you are using `fish`, or a Windows shell such as
|
> **Note**: If you are using `fish`, or a Windows shell such as
|
||||||
> Powershell/`cmd.exe` the above method will not work as described. Instead,
|
> Powershell/`cmd.exe` the above method will not work as described. Instead,
|
||||||
|
@ -79,7 +69,6 @@ restart your machine.
|
||||||
|
|
||||||
To see what will be set, run `docker-machine env dev`.
|
To see what will be set, run `docker-machine env dev`.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine env dev
|
$ docker-machine env dev
|
||||||
export DOCKER_TLS_VERIFY="1"
|
export DOCKER_TLS_VERIFY="1"
|
||||||
export DOCKER_HOST="tcp://172.16.62.130:2376"
|
export DOCKER_HOST="tcp://172.16.62.130:2376"
|
||||||
|
@ -87,11 +76,9 @@ export DOCKER_CERT_PATH="/Users/<your username>/.docker/machine/machines/dev"
|
||||||
export DOCKER_MACHINE_NAME="dev"
|
export DOCKER_MACHINE_NAME="dev"
|
||||||
# Run this command to configure your shell:
|
# Run this command to configure your shell:
|
||||||
# eval "$(docker-machine env dev)"
|
# eval "$(docker-machine env dev)"
|
||||||
```
|
|
||||||
|
|
||||||
You can now run Docker commands on this host:
|
You can now run Docker commands on this host:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker run busybox echo hello world
|
$ docker run busybox echo hello world
|
||||||
Unable to find image 'busybox' locally
|
Unable to find image 'busybox' locally
|
||||||
Pulling repository busybox
|
Pulling repository busybox
|
||||||
|
@ -100,27 +87,21 @@ e72ac664f4f0: Download complete
|
||||||
df7546f9f060: Download complete
|
df7546f9f060: Download complete
|
||||||
e433a6c5b276: Download complete
|
e433a6c5b276: Download complete
|
||||||
hello world
|
hello world
|
||||||
```
|
|
||||||
|
|
||||||
Any exposed ports are available on the Docker host’s IP address, which you can
|
Any exposed ports are available on the Docker host’s IP address, which you can
|
||||||
get using the `docker-machine ip` command:
|
get using the `docker-machine ip` command:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ip dev
|
$ docker-machine ip dev
|
||||||
192.168.99.100
|
192.168.99.100
|
||||||
```
|
|
||||||
|
|
||||||
For instance, you can try running a webserver ([nginx](https://www.nginx.com/) in a
|
For instance, you can try running a webserver ([nginx](https://www.nginx.com/) in a
|
||||||
container with the following command:
|
container with the following command:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker run -d -p 8000:80 nginx
|
$ docker run -d -p 8000:80 nginx
|
||||||
```
|
|
||||||
|
|
||||||
When the image is finished pulling, you can hit the server at port 8000 on the
|
When the image is finished pulling, you can hit the server at port 8000 on the
|
||||||
IP address given to you by `docker-machine ip`. For instance:
|
IP address given to you by `docker-machine ip`. For instance:
|
||||||
|
|
||||||
```
|
|
||||||
$ curl $(docker-machine ip dev):8000
|
$ curl $(docker-machine ip dev):8000
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
@ -147,7 +128,6 @@ Commercial support is available at
|
||||||
<p><em>Thank you for using nginx.</em></p>
|
<p><em>Thank you for using nginx.</em></p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
|
||||||
|
|
||||||
You can create and manage as many local VMs running Docker as you please- just
|
You can create and manage as many local VMs running Docker as you please- just
|
||||||
run `docker-machine create` again. All created machines will appear in the
|
run `docker-machine create` again. All created machines will appear in the
|
||||||
|
@ -157,7 +137,5 @@ If you are finished using a host for the time being, you can stop it with
|
||||||
`docker-machine stop` and later start it again with `docker-machine start`.
|
`docker-machine stop` and later start it again with `docker-machine start`.
|
||||||
Make sure to specify the machine name as an argument:
|
Make sure to specify the machine name as an argument:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine stop dev
|
$ docker-machine stop dev
|
||||||
$ docker-machine start dev
|
$ docker-machine start dev
|
||||||
```
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ parent="smn_workw_machine"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
|
|
||||||
# Docker Machine
|
# Docker Machine
|
||||||
|
|
||||||
Machine lets you create Docker hosts on your computer, on cloud providers, and
|
Machine lets you create Docker hosts on your computer, on cloud providers, and
|
||||||
|
@ -68,7 +67,7 @@ For more information and resources, please visit
|
||||||
|
|
||||||
## Where to go next
|
## Where to go next
|
||||||
|
|
||||||
* Install a machine on your [local system using VirtualBox](get-started.md).
|
- Install a machine on your [local system using VirtualBox](get-started.md).
|
||||||
* Install multiple machines [on your cloud provider](get-started-cloud.md).
|
- Install multiple machines [on your cloud provider](get-started-cloud.md).
|
||||||
* [Docker Machine driver reference](drivers/index.md)
|
- [Docker Machine driver reference](drivers/index.md)
|
||||||
* [Docker Machine subcommand reference](reference/index.md)
|
- [Docker Machine subcommand reference](reference/index.md)
|
||||||
|
|
|
@ -20,7 +20,7 @@ installation</a> instructions.
|
||||||
|
|
||||||
If you only want Docker Machine, you can install the Machine binaries (the
|
If you only want Docker Machine, you can install the Machine binaries (the
|
||||||
latest versions of which are located at
|
latest versions of which are located at
|
||||||
https://github.com/docker/machine/releases/ ) directly by following the
|
<https://github.com/docker/machine/releases/> ) directly by following the
|
||||||
instructions in the next section.
|
instructions in the next section.
|
||||||
|
|
||||||
## Installing Machine Directly
|
## Installing Machine Directly
|
||||||
|
@ -62,9 +62,9 @@ to your PATH.
|
||||||
The Machine repository supplies several `bash` scripts that add features such
|
The Machine repository supplies several `bash` scripts that add features such
|
||||||
as:
|
as:
|
||||||
|
|
||||||
* command completion
|
- command completion
|
||||||
* a function that displays the active machine in your shell prompt
|
- a function that displays the active machine in your shell prompt
|
||||||
* a function wrapper that adds a `docker-machine use` subcommand to switch the
|
- a function wrapper that adds a `docker-machine use` subcommand to switch the
|
||||||
active machine
|
active machine
|
||||||
|
|
||||||
To install the scripts, copy or link them into your `/etc/bash_completion.d` or
|
To install the scripts, copy or link them into your `/etc/bash_completion.d` or
|
||||||
|
@ -78,6 +78,6 @@ You can find additional documentation in the comments at the
|
||||||
|
|
||||||
## Where to go next
|
## Where to go next
|
||||||
|
|
||||||
* [Docker Machine overview](index.md)
|
- [Docker Machine overview](index.md)
|
||||||
* [Docker Machine driver reference](drivers/index.md)
|
- [Docker Machine driver reference](drivers/index.md)
|
||||||
* [Docker Machine subcommand reference](reference/index.md)
|
- [Docker Machine subcommand reference](reference/index.md)
|
||||||
|
|
|
@ -30,7 +30,7 @@ subcommands. The table below lists the equivalent `docker-machine` subcommand
|
||||||
and what it does:
|
and what it does:
|
||||||
|
|
||||||
| `boot2docker` | `docker-machine` | `docker-machine` description |
|
| `boot2docker` | `docker-machine` | `docker-machine` description |
|
||||||
|----------------|------------------|----------------------------------------------------------|
|
| ------------- | ---------------- | --------------------------------------------------------------------------------- |
|
||||||
| init | create | Creates a new docker host. |
|
| init | create | Creates a new docker host. |
|
||||||
| up | start | Starts a stopped machine. |
|
| up | start | Starts a stopped machine. |
|
||||||
| ssh | ssh | Runs a command or interactive ssh session on the machine. |
|
| ssh | ssh | Runs a command or interactive ssh session on the machine. |
|
||||||
|
@ -46,4 +46,3 @@ and what it does:
|
||||||
| delete | rm | Removes a machine. |
|
| delete | rm | Removes a machine. |
|
||||||
| download | - | Not applicable. |
|
| download | - | Not applicable. |
|
||||||
| upgrade | upgrade | Upgrades a machine's Docker client to the latest stable release. |
|
| upgrade | upgrade | Upgrades a machine's Docker client to the latest stable release. |
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ parent="smn_machine_subcmds"
|
||||||
See which machine is "active" (a machine is considered active if the
|
See which machine is "active" (a machine is considered active if the
|
||||||
`DOCKER_HOST` environment variable points to it).
|
`DOCKER_HOST` environment variable points to it).
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
dev - virtualbox Running tcp://192.168.99.103:2376
|
dev - virtualbox Running tcp://192.168.99.103:2376
|
||||||
|
@ -22,4 +21,3 @@ $ echo $DOCKER_HOST
|
||||||
tcp://104.236.50.118:2376
|
tcp://104.236.50.118:2376
|
||||||
$ docker-machine active
|
$ docker-machine active
|
||||||
staging
|
staging
|
||||||
```
|
|
||||||
|
|
|
@ -12,7 +12,5 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Show the Docker client configuration for a machine.
|
Show the Docker client configuration for a machine.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine config dev
|
$ docker-machine config dev
|
||||||
--tlsverify --tlscacert="/Users/ehazlett/.docker/machines/dev/ca.pem" --tlscert="/Users/ehazlett/.docker/machines/dev/cert.pem" --tlskey="/Users/ehazlett/.docker/machines/dev/key.pem" -H tcp://192.168.99.103:2376
|
--tlsverify --tlscacert="/Users/ehazlett/.docker/machines/dev/ca.pem" --tlscert="/Users/ehazlett/.docker/machines/dev/cert.pem" --tlskey="/Users/ehazlett/.docker/machines/dev/key.pem" -H tcp://192.168.99.103:2376
|
||||||
```
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ Create a machine. Requires the `--driver` flag to indicate which provider
|
||||||
(VirtualBox, DigitalOcean, AWS, etc.) the machine should be created on, and an
|
(VirtualBox, DigitalOcean, AWS, etc.) the machine should be created on, and an
|
||||||
argument to indicate the name of the created machine.
|
argument to indicate the name of the created machine.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create --driver virtualbox dev
|
$ docker-machine create --driver virtualbox dev
|
||||||
Creating CA: /home/username/.docker/machine/certs/ca.pem
|
Creating CA: /home/username/.docker/machine/certs/ca.pem
|
||||||
Creating client certificate: /home/username/.docker/machine/certs/cert.pem
|
Creating client certificate: /home/username/.docker/machine/certs/cert.pem
|
||||||
|
@ -27,7 +26,6 @@ Creating SSH key...
|
||||||
Starting VirtualBox VM...
|
Starting VirtualBox VM...
|
||||||
Starting VM...
|
Starting VM...
|
||||||
To see how to connect Docker to this machine, run: docker-machine env dev
|
To see how to connect Docker to this machine, run: docker-machine env dev
|
||||||
```
|
|
||||||
|
|
||||||
## Accessing driver-specific flags in the help text
|
## Accessing driver-specific flags in the help text
|
||||||
|
|
||||||
|
@ -36,7 +34,6 @@ drivers. These largely control aspects of Machine's provisoning process
|
||||||
(including the creation of Docker Swarm containers) that the user may wish to
|
(including the creation of Docker Swarm containers) that the user may wish to
|
||||||
customize.
|
customize.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create
|
$ docker-machine create
|
||||||
Docker Machine Version: 0.5.0 (45e3688)
|
Docker Machine Version: 0.5.0 (45e3688)
|
||||||
Usage: docker-machine create [OPTIONS] [arg...]
|
Usage: docker-machine create [OPTIONS] [arg...]
|
||||||
|
@ -63,7 +60,6 @@ Options:
|
||||||
--swarm-opt [--swarm-opt option --swarm-opt option] Define arbitrary flags for swarm
|
--swarm-opt [--swarm-opt option --swarm-opt option] Define arbitrary flags for swarm
|
||||||
--swarm-host "tcp://0.0.0.0:3376" ip/socket to listen on for Swarm master
|
--swarm-host "tcp://0.0.0.0:3376" ip/socket to listen on for Swarm master
|
||||||
--swarm-addr addr to advertise for Swarm (default: detect and use the machine IP)
|
--swarm-addr addr to advertise for Swarm (default: detect and use the machine IP)
|
||||||
```
|
|
||||||
|
|
||||||
Additionally, drivers can specify flags that Machine can accept as part of their
|
Additionally, drivers can specify flags that Machine can accept as part of their
|
||||||
plugin code. These allow users to customize the provider-specific parameters of
|
plugin code. These allow users to customize the provider-specific parameters of
|
||||||
|
@ -73,7 +69,6 @@ geographical region (`--amazonec2-region us-west-1`), and so on.
|
||||||
To see the provider-specific flags, simply pass a value for `--driver` when
|
To see the provider-specific flags, simply pass a value for `--driver` when
|
||||||
invoking the `create` help text.
|
invoking the `create` help text.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create --driver virtualbox --help
|
$ docker-machine create --driver virtualbox --help
|
||||||
Usage: docker-machine create [OPTIONS] [arg...]
|
Usage: docker-machine create [OPTIONS] [arg...]
|
||||||
|
|
||||||
|
@ -108,7 +103,6 @@ Options:
|
||||||
--virtualbox-import-boot2docker-vm The name of a Boot2Docker VM to import
|
--virtualbox-import-boot2docker-vm The name of a Boot2Docker VM to import
|
||||||
--virtualbox-memory "1024" Size of memory for host in MB [$VIRTUALBOX_MEMORY_SIZE]
|
--virtualbox-memory "1024" Size of memory for host in MB [$VIRTUALBOX_MEMORY_SIZE]
|
||||||
--virtualbox-no-share Disable the mount of your home directory
|
--virtualbox-no-share Disable the mount of your home directory
|
||||||
```
|
|
||||||
|
|
||||||
You may notice that some flags specify environment variables that they are
|
You may notice that some flags specify environment variables that they are
|
||||||
associated with as well (located to the far left hand side of the row). If
|
associated with as well (located to the far left hand side of the row). If
|
||||||
|
@ -139,14 +133,12 @@ filesystem has been created, and so on.
|
||||||
|
|
||||||
The following is an example usage:
|
The following is an example usage:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create -d virtualbox \
|
$ docker-machine create -d virtualbox \
|
||||||
--engine-label foo=bar \
|
--engine-label foo=bar \
|
||||||
--engine-label spam=eggs \
|
--engine-label spam=eggs \
|
||||||
--engine-storage-driver overlay \
|
--engine-storage-driver overlay \
|
||||||
--engine-insecure-registry registry.myco.com \
|
--engine-insecure-registry registry.myco.com \
|
||||||
foobarmachine
|
foobarmachine
|
||||||
```
|
|
||||||
|
|
||||||
This will create a virtual machine running locally in Virtualbox which uses the
|
This will create a virtual machine running locally in Virtualbox which uses the
|
||||||
`overlay` storage backend, has the key-value pairs `foo=bar` and `spam=eggs` as
|
`overlay` storage backend, has the key-value pairs `foo=bar` and `spam=eggs` as
|
||||||
|
@ -154,7 +146,6 @@ labels on the engine, and allows pushing / pulling from the insecure registry
|
||||||
located at `registry.myco.com`. You can verify much of this by inspecting the
|
located at `registry.myco.com`. You can verify much of this by inspecting the
|
||||||
output of `docker info`:
|
output of `docker info`:
|
||||||
|
|
||||||
```
|
|
||||||
$ eval $(docker-machine env foobarmachine)
|
$ eval $(docker-machine env foobarmachine)
|
||||||
$ docker info
|
$ docker info
|
||||||
Containers: 0
|
Containers: 0
|
||||||
|
@ -167,7 +158,6 @@ Labels:
|
||||||
foo=bar
|
foo=bar
|
||||||
spam=eggs
|
spam=eggs
|
||||||
provider=virtualbox
|
provider=virtualbox
|
||||||
```
|
|
||||||
|
|
||||||
The supported flags are as follows:
|
The supported flags are as follows:
|
||||||
|
|
||||||
|
@ -187,23 +177,19 @@ for all containers, and always use the `syslog` [log
|
||||||
driver](https://docs.docker.com/reference/run/#logging-drivers-log-driver) you
|
driver](https://docs.docker.com/reference/run/#logging-drivers-log-driver) you
|
||||||
could run the following create command:
|
could run the following create command:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create -d virtualbox \
|
$ docker-machine create -d virtualbox \
|
||||||
--engine-opt dns=8.8.8.8 \
|
--engine-opt dns=8.8.8.8 \
|
||||||
--engine-opt log-driver=syslog \
|
--engine-opt log-driver=syslog \
|
||||||
gdns
|
gdns
|
||||||
```
|
|
||||||
|
|
||||||
Additionally, Docker Machine supports a flag, `--engine-env`, which can be used to
|
Additionally, Docker Machine supports a flag, `--engine-env`, which can be used to
|
||||||
specify arbitrary environment variables to be set within the engine with the syntax `--engine-env name=value`. For example, to specify that the engine should use `example.com` as the proxy server, you could run the following create command:
|
specify arbitrary environment variables to be set within the engine with the syntax `--engine-env name=value`. For example, to specify that the engine should use `example.com` as the proxy server, you could run the following create command:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create -d virtualbox \
|
$ docker-machine create -d virtualbox \
|
||||||
--engine-env HTTP_PROXY=http://example.com:8080 \
|
--engine-env HTTP_PROXY=http://example.com:8080 \
|
||||||
--engine-env HTTPS_PROXY=https://example.com:8080 \
|
--engine-env HTTPS_PROXY=https://example.com:8080 \
|
||||||
--engine-env NO_PROXY=example2.com \
|
--engine-env NO_PROXY=example2.com \
|
||||||
proxbox
|
proxbox
|
||||||
```
|
|
||||||
|
|
||||||
## Specifying Docker Swarm options for the created machine
|
## Specifying Docker Swarm options for the created machine
|
||||||
|
|
||||||
|
@ -225,7 +211,6 @@ you won't have to worry about it.
|
||||||
|
|
||||||
Example create:
|
Example create:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine create -d virtualbox \
|
$ docker-machine create -d virtualbox \
|
||||||
--swarm \
|
--swarm \
|
||||||
--swarm-master \
|
--swarm-master \
|
||||||
|
@ -233,7 +218,6 @@ $ docker-machine create -d virtualbox \
|
||||||
--swarm-strategy binpack \
|
--swarm-strategy binpack \
|
||||||
--swarm-opt heartbeat=5 \
|
--swarm-opt heartbeat=5 \
|
||||||
upbeat
|
upbeat
|
||||||
```
|
|
||||||
|
|
||||||
This will set the swarm scheduling strategy to "binpack" (pack in containers as
|
This will set the swarm scheduling strategy to "binpack" (pack in containers as
|
||||||
tightly as possible per host instead of spreading them out), and the "heartbeat"
|
tightly as possible per host instead of spreading them out), and the "heartbeat"
|
||||||
|
|
|
@ -17,7 +17,6 @@ a particular machine.
|
||||||
run in a subshell. Running `docker-machine env -u` will print `unset` commands
|
run in a subshell. Running `docker-machine env -u` will print `unset` commands
|
||||||
which reverse this effect.
|
which reverse this effect.
|
||||||
|
|
||||||
```
|
|
||||||
$ env | grep DOCKER
|
$ env | grep DOCKER
|
||||||
$ eval "$(docker-machine env dev)"
|
$ eval "$(docker-machine env dev)"
|
||||||
$ env | grep DOCKER
|
$ env | grep DOCKER
|
||||||
|
@ -29,7 +28,6 @@ $ # If you run a docker command, now it will run against that host.
|
||||||
$ eval "$(docker-machine env -u)"
|
$ eval "$(docker-machine env -u)"
|
||||||
$ env | grep DOCKER
|
$ env | grep DOCKER
|
||||||
$ # The environment variables have been unset.
|
$ # The environment variables have been unset.
|
||||||
```
|
|
||||||
|
|
||||||
The output described above is intended for the shells `bash` and `zsh` (if
|
The output described above is intended for the shells `bash` and `zsh` (if
|
||||||
you're not sure which shell you're using, there's a very good possibility that
|
you're not sure which shell you're using, there's a very good possibility that
|
||||||
|
@ -40,14 +38,12 @@ If you are using `fish` and the `SHELL` environment variable is correctly set to
|
||||||
the path where `fish` is located, `docker-machine env name` will print out the
|
the path where `fish` is located, `docker-machine env name` will print out the
|
||||||
values in the format which `fish` expects:
|
values in the format which `fish` expects:
|
||||||
|
|
||||||
```
|
|
||||||
set -x DOCKER_TLS_VERIFY 1;
|
set -x DOCKER_TLS_VERIFY 1;
|
||||||
set -x DOCKER_CERT_PATH "/Users/nathanleclaire/.docker/machine/machines/overlay";
|
set -x DOCKER_CERT_PATH "/Users/nathanleclaire/.docker/machine/machines/overlay";
|
||||||
set -x DOCKER_HOST tcp://192.168.99.102:2376;
|
set -x DOCKER_HOST tcp://192.168.99.102:2376;
|
||||||
set -x DOCKER_MACHINE_NAME overlay
|
set -x DOCKER_MACHINE_NAME overlay
|
||||||
# Run this command to configure your shell:
|
# Run this command to configure your shell:
|
||||||
# eval "$(docker-machine env overlay)"
|
# eval "$(docker-machine env overlay)"
|
||||||
```
|
|
||||||
|
|
||||||
If you are on Windows and using Powershell or `cmd.exe`, `docker-machine env`
|
If you are on Windows and using Powershell or `cmd.exe`, `docker-machine env`
|
||||||
cannot detect your shell automatically, but it does have support for these
|
cannot detect your shell automatically, but it does have support for these
|
||||||
|
@ -56,7 +52,6 @@ options for using the `--shell` flag for `docker-machine env`.
|
||||||
|
|
||||||
For Powershell:
|
For Powershell:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine.exe env --shell powershell dev
|
$ docker-machine.exe env --shell powershell dev
|
||||||
$Env:DOCKER_TLS_VERIFY = "1"
|
$Env:DOCKER_TLS_VERIFY = "1"
|
||||||
$Env:DOCKER_HOST = "tcp://192.168.99.101:2376"
|
$Env:DOCKER_HOST = "tcp://192.168.99.101:2376"
|
||||||
|
@ -64,18 +59,15 @@ $Env:DOCKER_CERT_PATH = "C:\Users\captain\.docker\machine\machines\dev"
|
||||||
$Env:DOCKER_MACHINE_NAME = "dev"
|
$Env:DOCKER_MACHINE_NAME = "dev"
|
||||||
# Run this command to configure your shell:
|
# Run this command to configure your shell:
|
||||||
# docker-machine.exe env --shell=powershell dev | Invoke-Expression
|
# docker-machine.exe env --shell=powershell dev | Invoke-Expression
|
||||||
```
|
|
||||||
|
|
||||||
For `cmd.exe`:
|
For `cmd.exe`:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine.exe env --shell cmd dev
|
$ docker-machine.exe env --shell cmd dev
|
||||||
set DOCKER_TLS_VERIFY=1
|
set DOCKER_TLS_VERIFY=1
|
||||||
set DOCKER_HOST=tcp://192.168.99.101:2376
|
set DOCKER_HOST=tcp://192.168.99.101:2376
|
||||||
set DOCKER_CERT_PATH=C:\Users\captain\.docker\machine\machines\dev
|
set DOCKER_CERT_PATH=C:\Users\captain\.docker\machine\machines\dev
|
||||||
set DOCKER_MACHINE_NAME=dev
|
set DOCKER_MACHINE_NAME=dev
|
||||||
# Run this command to configure your shell: copy and paste the above values into your command prompt
|
# Run this command to configure your shell: copy and paste the above values into your command prompt
|
||||||
```
|
|
||||||
|
|
||||||
## Excluding the created machine from proxies
|
## Excluding the created machine from proxies
|
||||||
|
|
||||||
|
@ -87,7 +79,6 @@ This is useful when using `docker-machine` with a local VM provider (e.g.
|
||||||
`virtualbox` or `vmwarefusion`) in network environments where a HTTP proxy is
|
`virtualbox` or `vmwarefusion`) in network environments where a HTTP proxy is
|
||||||
required for internet access.
|
required for internet access.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine env --no-proxy default
|
$ docker-machine env --no-proxy default
|
||||||
export DOCKER_TLS_VERIFY="1"
|
export DOCKER_TLS_VERIFY="1"
|
||||||
export DOCKER_HOST="tcp://192.168.99.104:2376"
|
export DOCKER_HOST="tcp://192.168.99.104:2376"
|
||||||
|
@ -96,7 +87,6 @@ export DOCKER_MACHINE_NAME="default"
|
||||||
export NO_PROXY="192.168.99.104"
|
export NO_PROXY="192.168.99.104"
|
||||||
# Run this command to configure your shell:
|
# Run this command to configure your shell:
|
||||||
# eval "$(docker-machine env default)"
|
# eval "$(docker-machine env default)"
|
||||||
```
|
|
||||||
|
|
||||||
You may also want to visit the [documentation on setting `HTTP_PROXY` for the
|
You may also want to visit the [documentation on setting `HTTP_PROXY` for the
|
||||||
created daemon using the `--engine-env` flag for `docker-machine
|
created daemon using the `--engine-env` flag for `docker-machine
|
||||||
|
|
|
@ -10,7 +10,7 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
# help
|
# help
|
||||||
|
|
||||||
Usage: docker-machine help *subcommand*
|
Usage: docker-machine help _subcommand_
|
||||||
|
|
||||||
Show help text, for example:
|
Show help text, for example:
|
||||||
|
|
||||||
|
|
|
@ -9,25 +9,24 @@ parent="smn_machine_ref"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
||||||
|
|
||||||
# Supported Docker Machine subcommands
|
# Supported Docker Machine subcommands
|
||||||
|
|
||||||
* [active](active.md)
|
- [active](active.md)
|
||||||
* [config](config.md)
|
- [config](config.md)
|
||||||
* [create](create.md)
|
- [create](create.md)
|
||||||
* [env](env.md)
|
- [env](env.md)
|
||||||
* [help](help.md)
|
- [help](help.md)
|
||||||
* [inspect](inspect.md)
|
- [inspect](inspect.md)
|
||||||
* [ip](ip.md)
|
- [ip](ip.md)
|
||||||
* [kill](kill.md)
|
- [kill](kill.md)
|
||||||
* [ls](ls.md)
|
- [ls](ls.md)
|
||||||
* [regenerate-certs](regenerate-certs.md)
|
- [regenerate-certs](regenerate-certs.md)
|
||||||
* [restart](restart.md)
|
- [restart](restart.md)
|
||||||
* [rm](rm.md)
|
- [rm](rm.md)
|
||||||
* [scp](scp.md)
|
- [scp](scp.md)
|
||||||
* [ssh](ssh.md)
|
- [ssh](ssh.md)
|
||||||
* [start](start.md)
|
- [start](start.md)
|
||||||
* [status](status.md)
|
- [status](status.md)
|
||||||
* [stop](stop.md)
|
- [stop](stop.md)
|
||||||
* [upgrade](upgrade.md)
|
- [upgrade](upgrade.md)
|
||||||
* [url](url.md)
|
- [url](url.md)
|
||||||
|
|
|
@ -11,7 +11,6 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
# inspect
|
# inspect
|
||||||
|
|
||||||
```
|
|
||||||
Usage: docker-machine inspect [OPTIONS] [arg...]
|
Usage: docker-machine inspect [OPTIONS] [arg...]
|
||||||
|
|
||||||
Inspect information about a machine
|
Inspect information about a machine
|
||||||
|
@ -21,7 +20,6 @@ Description:
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--format, -f Format the output using the given go template.
|
--format, -f Format the output using the given go template.
|
||||||
```
|
|
||||||
|
|
||||||
By default, this will render information about a machine as JSON. If a format is
|
By default, this will render information about a machine as JSON. If a format is
|
||||||
specified, the given template will be executed for each result.
|
specified, the given template will be executed for each result.
|
||||||
|
@ -38,7 +36,6 @@ In addition to the `text/template` syntax, there are some additional functions,
|
||||||
|
|
||||||
This is the default usage of `inspect`.
|
This is the default usage of `inspect`.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine inspect dev
|
$ docker-machine inspect dev
|
||||||
{
|
{
|
||||||
"DriverName": "virtualbox",
|
"DriverName": "virtualbox",
|
||||||
|
@ -52,32 +49,26 @@ $ docker-machine inspect dev
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
|
||||||
**Get a machine's IP address:**
|
**Get a machine's IP address:**
|
||||||
|
|
||||||
For the most part, you can pick out any field from the JSON in a fairly
|
For the most part, you can pick out any field from the JSON in a fairly
|
||||||
straightforward manner.
|
straightforward manner.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine inspect --format='{{.Driver.IPAddress}}' dev
|
$ docker-machine inspect --format='{{.Driver.IPAddress}}' dev
|
||||||
192.168.5.99
|
192.168.5.99
|
||||||
```
|
|
||||||
|
|
||||||
**Formatting details:**
|
**Formatting details:**
|
||||||
|
|
||||||
If you want a subset of information formatted as JSON, you can use the `json`
|
If you want a subset of information formatted as JSON, you can use the `json`
|
||||||
function in the template.
|
function in the template.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine inspect --format='{{json .Driver}}' dev-fusion
|
$ docker-machine inspect --format='{{json .Driver}}' dev-fusion
|
||||||
{"Boot2DockerURL":"","CPUS":8,"CPUs":8,"CaCertPath":"/Users/hairyhenderson/.docker/machine/certs/ca.pem","DiskSize":20000,"IPAddress":"172.16.62.129","ISO":"/Users/hairyhenderson/.docker/machine/machines/dev-fusion/boot2docker-1.5.0-GH747.iso","MachineName":"dev-fusion","Memory":1024,"PrivateKeyPath":"/Users/hairyhenderson/.docker/machine/certs/ca-key.pem","SSHPort":22,"SSHUser":"docker","SwarmDiscovery":"","SwarmHost":"tcp://0.0.0.0:3376","SwarmMaster":false}
|
{"Boot2DockerURL":"","CPUS":8,"CPUs":8,"CaCertPath":"/Users/hairyhenderson/.docker/machine/certs/ca.pem","DiskSize":20000,"IPAddress":"172.16.62.129","ISO":"/Users/hairyhenderson/.docker/machine/machines/dev-fusion/boot2docker-1.5.0-GH747.iso","MachineName":"dev-fusion","Memory":1024,"PrivateKeyPath":"/Users/hairyhenderson/.docker/machine/certs/ca-key.pem","SSHPort":22,"SSHUser":"docker","SwarmDiscovery":"","SwarmHost":"tcp://0.0.0.0:3376","SwarmMaster":false}
|
||||||
```
|
|
||||||
|
|
||||||
While this is usable, it's not very human-readable. For this reason, there is
|
While this is usable, it's not very human-readable. For this reason, there is
|
||||||
`prettyjson`:
|
`prettyjson`:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine inspect --format='{{prettyjson .Driver}}' dev-fusion
|
$ docker-machine inspect --format='{{prettyjson .Driver}}' dev-fusion
|
||||||
{
|
{
|
||||||
"Boot2DockerURL": "",
|
"Boot2DockerURL": "",
|
||||||
|
@ -96,4 +87,3 @@ $ docker-machine inspect --format='{{prettyjson .Driver}}' dev-fusion
|
||||||
"SwarmHost": "tcp://0.0.0.0:3376",
|
"SwarmHost": "tcp://0.0.0.0:3376",
|
||||||
"SwarmMaster": false
|
"SwarmMaster": false
|
||||||
}
|
}
|
||||||
```
|
|
|
@ -12,10 +12,8 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Get the IP address of one or more machines.
|
Get the IP address of one or more machines.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ip dev
|
$ docker-machine ip dev
|
||||||
192.168.99.104
|
192.168.99.104
|
||||||
$ docker-machine ip dev dev2
|
$ docker-machine ip dev dev2
|
||||||
192.168.99.104
|
192.168.99.104
|
||||||
192.168.99.105
|
192.168.99.105
|
||||||
```
|
|
|
@ -13,7 +13,6 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Kill (abruptly force stop) a machine.
|
Kill (abruptly force stop) a machine.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
dev * virtualbox Running tcp://192.168.99.104:2376
|
dev * virtualbox Running tcp://192.168.99.104:2376
|
||||||
|
@ -21,4 +20,3 @@ $ docker-machine kill dev
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
dev * virtualbox Stopped
|
dev * virtualbox Stopped
|
||||||
```
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
# ls
|
# ls
|
||||||
|
|
||||||
```
|
|
||||||
Usage: docker-machine ls [OPTIONS] [arg...]
|
Usage: docker-machine ls [OPTIONS] [arg...]
|
||||||
|
|
||||||
List machines
|
List machines
|
||||||
|
@ -19,7 +18,6 @@ Options:
|
||||||
|
|
||||||
--quiet, -q Enable quiet mode
|
--quiet, -q Enable quiet mode
|
||||||
--filter [--filter option --filter option] Filter output based on conditions provided
|
--filter [--filter option --filter option] Filter output based on conditions provided
|
||||||
```
|
|
||||||
|
|
||||||
## Filtering
|
## Filtering
|
||||||
|
|
||||||
|
@ -28,24 +26,20 @@ than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bi
|
||||||
|
|
||||||
The currently supported filters are:
|
The currently supported filters are:
|
||||||
|
|
||||||
* driver (driver name)
|
- driver (driver name)
|
||||||
* swarm (swarm master's name)
|
- swarm (swarm master's name)
|
||||||
* state (`Running|Paused|Saved|Stopped|Stopping|Starting|Error`)
|
- state (`Running|Paused|Saved|Stopped|Stopping|Starting|Error`)
|
||||||
* name (Machine name returned by driver, supports [golang style](https://github.com/google/re2/wiki/Syntax) regular expressions)
|
- name (Machine name returned by driver, supports [golang style](https://github.com/google/re2/wiki/Syntax) regular expressions)
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
dev - virtualbox Stopped
|
dev - virtualbox Stopped
|
||||||
foo0 - virtualbox Running tcp://192.168.99.105:2376
|
foo0 - virtualbox Running tcp://192.168.99.105:2376
|
||||||
foo1 - virtualbox Running tcp://192.168.99.106:2376
|
foo1 - virtualbox Running tcp://192.168.99.106:2376
|
||||||
foo2 * virtualbox Running tcp://192.168.99.107:2376
|
foo2 * virtualbox Running tcp://192.168.99.107:2376
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls --filter driver=virtualbox --filter state=Stopped
|
$ docker-machine ls --filter driver=virtualbox --filter state=Stopped
|
||||||
NAME ACTIVE DRIVER STATE URL SWARM
|
NAME ACTIVE DRIVER STATE URL SWARM
|
||||||
dev - virtualbox Stopped
|
dev - virtualbox Stopped
|
||||||
```
|
|
||||||
|
|
|
@ -12,8 +12,6 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Regenerate TLS certificates and update the machine with new certs.
|
Regenerate TLS certificates and update the machine with new certs.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine regenerate-certs dev
|
$ docker-machine regenerate-certs dev
|
||||||
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
|
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
|
||||||
Regenerating TLS certificates
|
Regenerating TLS certificates
|
||||||
```
|
|
||||||
|
|
|
@ -14,7 +14,5 @@ parent="smn_machine_subcmds"
|
||||||
Restart a machine. Oftentimes this is equivalent to
|
Restart a machine. Oftentimes this is equivalent to
|
||||||
`docker-machine stop; docker-machine start`.
|
`docker-machine stop; docker-machine start`.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine restart dev
|
$ docker-machine restart dev
|
||||||
Waiting for VM to start...
|
Waiting for VM to start...
|
||||||
```
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ parent="smn_machine_subcmds"
|
||||||
Remove a machine. This will remove the local reference as well as delete it
|
Remove a machine. This will remove the local reference as well as delete it
|
||||||
on the cloud provider or virtualization management platform.
|
on the cloud provider or virtualization management platform.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
foo0 - virtualbox Running tcp://192.168.99.105:2376
|
foo0 - virtualbox Running tcp://192.168.99.105:2376
|
||||||
|
@ -23,4 +22,3 @@ $ docker-machine rm foo1
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
foo0 - virtualbox Running tcp://192.168.99.105:2376
|
foo0 - virtualbox Running tcp://192.168.99.105:2376
|
||||||
```
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ machine's case, you don't have to specify the name, just the path.
|
||||||
|
|
||||||
Consider the following example:
|
Consider the following example:
|
||||||
|
|
||||||
```
|
|
||||||
$ cat foo.txt
|
$ cat foo.txt
|
||||||
cat: foo.txt: No such file or directory
|
cat: foo.txt: No such file or directory
|
||||||
$ docker-machine ssh dev pwd
|
$ docker-machine ssh dev pwd
|
||||||
|
@ -28,7 +27,6 @@ $ docker-machine scp dev:/home/docker/foo.txt .
|
||||||
foo.txt 100% 28 0.0KB/s 00:00
|
foo.txt 100% 28 0.0KB/s 00:00
|
||||||
$ cat foo.txt
|
$ cat foo.txt
|
||||||
A file created remotely!
|
A file created remotely!
|
||||||
```
|
|
||||||
|
|
||||||
Just like how `scp` has a `-r` flag for copying files recursively,
|
Just like how `scp` has a `-r` flag for copying files recursively,
|
||||||
`docker-machine` has a `-r` flag for this feature.
|
`docker-machine` has a `-r` flag for this feature.
|
||||||
|
|
|
@ -14,7 +14,6 @@ Log into or run a command on a machine using SSH.
|
||||||
|
|
||||||
To login, just run `docker-machine ssh machinename`:
|
To login, just run `docker-machine ssh machinename`:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ssh dev
|
$ docker-machine ssh dev
|
||||||
## .
|
## .
|
||||||
## ## ## ==
|
## ## ## ==
|
||||||
|
@ -33,22 +32,18 @@ Boot2Docker version 1.4.0, build master : 69cf398 - Fri Dec 12 01:39:42 UTC 2014
|
||||||
docker@boot2docker:~$ ls /
|
docker@boot2docker:~$ ls /
|
||||||
Users/ dev/ home/ lib/ mnt/ proc/ run/ sys/ usr/
|
Users/ dev/ home/ lib/ mnt/ proc/ run/ sys/ usr/
|
||||||
bin/ etc/ init linuxrc opt/ root/ sbin/ tmp var/
|
bin/ etc/ init linuxrc opt/ root/ sbin/ tmp var/
|
||||||
```
|
|
||||||
|
|
||||||
You can also specify commands to run remotely by appending them directly to the
|
You can also specify commands to run remotely by appending them directly to the
|
||||||
`docker-machine ssh` command, much like the regular `ssh` program works:
|
`docker-machine ssh` command, much like the regular `ssh` program works:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ssh dev free
|
$ docker-machine ssh dev free
|
||||||
total used free shared buffers
|
total used free shared buffers
|
||||||
Mem: 1023556 183136 840420 0 30920
|
Mem: 1023556 183136 840420 0 30920
|
||||||
-/+ buffers: 152216 871340
|
-/+ buffers: 152216 871340
|
||||||
Swap: 1212036 0 1212036
|
Swap: 1212036 0 1212036
|
||||||
```
|
|
||||||
|
|
||||||
Commands with flags will work as well:
|
Commands with flags will work as well:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ssh dev df -h
|
$ docker-machine ssh dev df -h
|
||||||
Filesystem Size Used Available Use% Mounted on
|
Filesystem Size Used Available Use% Mounted on
|
||||||
rootfs 899.6M 85.9M 813.7M 10% /
|
rootfs 899.6M 85.9M 813.7M 10% /
|
||||||
|
@ -58,7 +53,6 @@ tmpfs 499.8M 0 499.8M 0% /dev/shm
|
||||||
cgroup 499.8M 0 499.8M 0% /sys/fs/cgroup
|
cgroup 499.8M 0 499.8M 0% /sys/fs/cgroup
|
||||||
/dev/sda1 18.2G 58.2M 17.2G 0%
|
/dev/sda1 18.2G 58.2M 17.2G 0%
|
||||||
/mnt/sda1/var/lib/docker/aufs
|
/mnt/sda1/var/lib/docker/aufs
|
||||||
```
|
|
||||||
|
|
||||||
If you are using the "external" SSH type as detailed in the next section, you
|
If you are using the "external" SSH type as detailed in the next section, you
|
||||||
can include additional arguments to pass through to the `ssh` binary in the
|
can include additional arguments to pass through to the `ssh` binary in the
|
||||||
|
@ -67,9 +61,7 @@ the command generated by Docker Machine). For instance, the following command
|
||||||
will forward port 8080 from the `default` machine to `localhost` on your host
|
will forward port 8080 from the `default` machine to `localhost` on your host
|
||||||
computer:
|
computer:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ssh default -L 8080:localhost:8080
|
$ docker-machine ssh default -L 8080:localhost:8080
|
||||||
```
|
|
||||||
|
|
||||||
## Different types of SSH
|
## Different types of SSH
|
||||||
|
|
||||||
|
@ -88,9 +80,7 @@ and Docker Machine will act sensibly out of the box. However, if you
|
||||||
deliberately want to use the Go native version, you can do so with a global
|
deliberately want to use the Go native version, you can do so with a global
|
||||||
command line flag / environment variable like so:
|
command line flag / environment variable like so:
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine --native-ssh ssh dev
|
$ docker-machine --native-ssh ssh dev
|
||||||
```
|
|
||||||
|
|
||||||
There are some variations in behavior between the two methods, so please report
|
There are some variations in behavior between the two methods, so please report
|
||||||
any issues or inconsistencies if you come across them.
|
any issues or inconsistencies if you come across them.
|
||||||
|
|
|
@ -13,7 +13,5 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Start a machine.
|
Start a machine.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine start dev
|
$ docker-machine start dev
|
||||||
Starting VM...
|
Starting VM...
|
||||||
```
|
|
||||||
|
|
|
@ -12,7 +12,5 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Get the status of a machine.
|
Get the status of a machine.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine status dev
|
$ docker-machine status dev
|
||||||
Running
|
Running
|
||||||
```
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Gracefully stop a machine.
|
Gracefully stop a machine.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
dev * virtualbox Running tcp://192.168.99.104:2376
|
dev * virtualbox Running tcp://192.168.99.104:2376
|
||||||
|
@ -21,4 +20,3 @@ $ docker-machine stop dev
|
||||||
$ docker-machine ls
|
$ docker-machine ls
|
||||||
NAME ACTIVE DRIVER STATE URL
|
NAME ACTIVE DRIVER STATE URL
|
||||||
dev * virtualbox Stopped
|
dev * virtualbox Stopped
|
||||||
```
|
|
|
@ -19,14 +19,12 @@ expects Ubuntu machines it manages to use this package. As another example, if
|
||||||
the machine uses boot2docker for its OS, this command will download the latest
|
the machine uses boot2docker for its OS, this command will download the latest
|
||||||
boot2docker ISO and replace the machine's existing ISO with the latest.
|
boot2docker ISO and replace the machine's existing ISO with the latest.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine upgrade dev
|
$ docker-machine upgrade dev
|
||||||
Stopping machine to do the upgrade...
|
Stopping machine to do the upgrade...
|
||||||
Upgrading machine dev...
|
Upgrading machine dev...
|
||||||
Downloading latest boot2docker release to /home/username/.docker/machine/cache/boot2docker.iso...
|
Downloading latest boot2docker release to /home/username/.docker/machine/cache/boot2docker.iso...
|
||||||
Starting machine back up...
|
Starting machine back up...
|
||||||
Waiting for VM to start...
|
Waiting for VM to start...
|
||||||
```
|
|
||||||
|
|
||||||
> **Note**: If you are using a custom boot2docker ISO specified using
|
> **Note**: If you are using a custom boot2docker ISO specified using
|
||||||
> `--virtualbox-boot2docker-url` or an equivalent flag, running an upgrade on
|
> `--virtualbox-boot2docker-url` or an equivalent flag, running an upgrade on
|
||||||
|
|
|
@ -12,7 +12,5 @@ parent="smn_machine_subcmds"
|
||||||
|
|
||||||
Get the URL of a host
|
Get the URL of a host
|
||||||
|
|
||||||
```
|
|
||||||
$ docker-machine url dev
|
$ docker-machine url dev
|
||||||
tcp://192.168.99.109:2376
|
tcp://192.168.99.109:2376
|
||||||
```
|
|
Loading…
Reference in New Issue