Skip to content

Commit e95301d

Browse files
author
Jacob Middag
committed
Use DOCKER_MACHINE_NAME environment variable
1 parent 3999ac2 commit e95301d

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

bin/integration-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ my $dir = dirname($0);
1010

1111
my $hostip;
1212
if (`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
}

bin/restore-wordpress

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ export WORDPRESS_DATABASE=wordpress_$version
2121
export MYSQL_ROOT_PASSWORD=root
2222

2323
if 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)
2525
else
2626
export HOST_IP=$(boot2docker ip)
2727
fi
28+
if [ -z "$HOST_IP" ]; then
29+
echo "Could not find docker machine ip"
30+
exit 2
31+
fi
2832

2933
export MYSQL_DUMP_FILE=tmp/mysqldump_wordpress_$version.sql.gz
3034

bin/test-wordpress

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ export WORDPRESS_DATABASE=wordpress_$version
2828
export MYSQL_ROOT_PASSWORD=root
2929

3030
if 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)
3232
else
3333
export HOST_IP=$(boot2docker ip)
3434
fi
35+
if [ -z "$HOST_IP" ]; then
36+
echo "Could not find docker machine ip"
37+
exit 2
38+
fi
3539

3640
export HOST_PORT=80$version
3741
export WORDPRESS_URL=http://$HOST_IP:$HOST_PORT

0 commit comments

Comments
 (0)