Compare commits
7 Commits
v0.6.0-rc3
...
v0.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b9eaf2b6f | ||
|
|
f1c04ff277 | ||
|
|
b8d1e022df | ||
|
|
76d349fefb | ||
|
|
c742426ce1 | ||
|
|
899bfa9d77 | ||
|
|
48bea37d09 |
@@ -750,9 +750,9 @@ func generateUsageHint(machineName string, userShell string) string {
|
||||
}
|
||||
default:
|
||||
if machineName != "" {
|
||||
cmd = fmt.Sprintf("eval $(docker-machine env %s)", machineName)
|
||||
cmd = fmt.Sprintf("eval \"$(docker-machine env %s)\"", machineName)
|
||||
} else {
|
||||
cmd = "eval $(docker-machine env)"
|
||||
cmd = "eval \"$(docker-machine env)\""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,22 @@ managing them:
|
||||
- Upgrading Docker
|
||||
- Configuring the Docker client to talk to your host
|
||||
|
||||
## Getting help
|
||||
|
||||
Docker Machine is still in its infancy and under active development. If you need
|
||||
help, would like to contribute, or simply want to talk about to the project with
|
||||
like-minded individuals, we have a number of open channels for communication.
|
||||
|
||||
- To report bugs or file feature requests: please use the [issue tracker on
|
||||
Github](https://github.com/docker/machine/issues).
|
||||
- To talk about the project with people in real time: please join the
|
||||
`#docker-machine` channel on IRC.
|
||||
- To contribute code or documentation changes: please [submit a pull request on
|
||||
Github](https://github.com/docker/machine/pulls).
|
||||
|
||||
For more information and resources, please visit
|
||||
[https://docs.docker.com/project/get-help/](https://docs.docker.com/project/get-help/).
|
||||
|
||||
## Installation
|
||||
|
||||
Docker Machine is supported on Windows, OSX, and Linux. To install Docker
|
||||
@@ -820,7 +836,7 @@ variable and CLI option are provided the CLI option takes the precedence.
|
||||
| Environment variable | CLI option |
|
||||
|----------------------|-----------------------------|
|
||||
| `OS_USERNAME` | `--rackspace-username` |
|
||||
| `OS_API_KEY` | `--rackspace-ap-key` |
|
||||
| `OS_API_KEY` | `--rackspace-api-key` |
|
||||
| `OS_REGION_NAME` | `--rackspace-region` |
|
||||
| `OS_ENDPOINT_TYPE` | `--rackspace-endpoint-type` |
|
||||
|
||||
|
||||
@@ -234,12 +234,6 @@ func (d *Driver) Create() error {
|
||||
newDroplet.Droplet.ID,
|
||||
d.IPAddress)
|
||||
|
||||
log.Infof("Waiting for SSH...")
|
||||
|
||||
if err := ssh.WaitForTCP(fmt.Sprintf("%s:%d", d.IPAddress, 22)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,12 @@ import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/docker/machine/drivers"
|
||||
"github.com/docker/machine/libmachine/auth"
|
||||
"github.com/docker/machine/libmachine/provision/pkgaction"
|
||||
"github.com/docker/machine/libmachine/swarm"
|
||||
"github.com/docker/machine/utils"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -80,6 +82,21 @@ func (provisioner *UbuntuProvisioner) Package(name string, action pkgaction.Pack
|
||||
return nil
|
||||
}
|
||||
|
||||
func (provisioner *UbuntuProvisioner) dockerDaemonResponding() bool {
|
||||
cmd, err := provisioner.SSHCommand("sudo docker version")
|
||||
if err != nil {
|
||||
log.Warn("Error getting SSH command to check if the daemon is up: %s", err)
|
||||
return false
|
||||
}
|
||||
if err := cmd.Run(); err != nil {
|
||||
log.Debug("Error checking for daemon up: %s", err)
|
||||
return false
|
||||
}
|
||||
|
||||
// The daemon is up if the command worked. Carry on.
|
||||
return true
|
||||
}
|
||||
|
||||
func (provisioner *UbuntuProvisioner) Provision(swarmOptions swarm.SwarmOptions, authOptions auth.AuthOptions) error {
|
||||
if err := provisioner.SetHostname(provisioner.Driver.GetMachineName()); err != nil {
|
||||
return err
|
||||
@@ -95,6 +112,10 @@ func (provisioner *UbuntuProvisioner) Provision(swarmOptions swarm.SwarmOptions,
|
||||
return err
|
||||
}
|
||||
|
||||
if err := utils.WaitFor(provisioner.dockerDaemonResponding); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := ConfigureAuth(provisioner, authOptions); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -13,8 +13,9 @@ import (
|
||||
func GetSSHCommand(host string, port int, user string, sshKey string, args ...string) *exec.Cmd {
|
||||
defaultSSHArgs := []string{
|
||||
"-o", "IdentitiesOnly=yes",
|
||||
"-o", "StrictHostKeyChecking=no",
|
||||
"-o", "UserKnownHostsFile=/dev/null",
|
||||
"-o", "StrictHostKeyChecking=no", // don't bother checking in ~/.ssh/known_hosts
|
||||
"-o", "UserKnownHostsFile=/dev/null", // don't write anything to ~/.ssh/known_hosts
|
||||
"-o", "ConnectionAttempts=30", // retry 30 times if SSH connection fails
|
||||
"-o", "LogLevel=quiet", // suppress "Warning: Permanently added '[localhost]:2022' (ECDSA) to the list of known hosts."
|
||||
"-p", fmt.Sprintf("%d", port),
|
||||
"-i", sshKey,
|
||||
|
||||
Reference in New Issue
Block a user