Merge pull request #80 from andyz-dev/ignore-docker-machine

[Enhancement] Ignore docker-machine command line error (@andyz-dev)
pull/48/head^2
Thorsten Klein 5 years ago committed by GitHub
commit 341f0b3cbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      cli/commands.go

@ -109,12 +109,14 @@ func CreateCluster(c *cli.Context) error {
// When the 'host' is not provided by --api-port, try to fill it using Docker Machine's IP address.
if apiPort.Host == "" {
if apiPort.Host, err = getDockerMachineIp(); err != nil {
return err
}
apiPort.Host, err = getDockerMachineIp()
// IP address is the same as the host
apiPort.HostIp = apiPort.Host
// In case of error, Log a warning message, and continue on. Since it more likely caused by a miss configured
// DOCKER_MACHINE_NAME environment variable.
if err != nil {
log.Printf("WARNING: Failed to get docker machine IP address, ignoring the DOCKER_MACHINE_NAME environment variable setting.\n")
}
}
if apiPort.Host != "" {

Loading…
Cancel
Save