File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ my $dir = dirname($0);
1010
1111my $hostip ;
1212if (` which docker-machine` ) {
13- $hostip = ` docker-machine ip default ` ;
13+ $hostip = ` docker-machine ip $ENV {'DOCKER_MACHINE_NAME'} ` ;
1414} else {
1515 $hostip = ` boot2docker ip` ;
1616}
Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ export WORDPRESS_DATABASE=wordpress_$version
2121export MYSQL_ROOT_PASSWORD=root
2222
2323if hash docker-machine 2> /dev/null; then
24- export HOST_IP=$( docker-machine ip default )
24+ export HOST_IP=$( docker-machine ip $DOCKER_MACHINE_NAME )
2525else
2626 export HOST_IP=$( boot2docker ip)
2727fi
28+ if [ -z " $HOST_IP " ]; then
29+ echo " Could not find docker machine ip"
30+ exit 2
31+ fi
2832
2933export MYSQL_DUMP_FILE=tmp/mysqldump_wordpress_$version .sql.gz
3034
Original file line number Diff line number Diff line change @@ -28,10 +28,14 @@ export WORDPRESS_DATABASE=wordpress_$version
2828export MYSQL_ROOT_PASSWORD=root
2929
3030if hash docker-machine 2> /dev/null; then
31- export HOST_IP=$( docker-machine ip default )
31+ export HOST_IP=$( docker-machine ip $DOCKER_MACHINE_NAME )
3232else
3333 export HOST_IP=$( boot2docker ip)
3434fi
35+ if [ -z " $HOST_IP " ]; then
36+ echo " Could not find docker machine ip"
37+ exit 2
38+ fi
3539
3640export HOST_PORT=80$version
3741export WORDPRESS_URL=http://$HOST_IP :$HOST_PORT
You can’t perform that action at this time.
0 commit comments