1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

check to see if the boot2docker vm is running before starting it as

docker-machine now seems to throw an error when starting a running VM

Signed-off-by: Keith Starling <yoerayo@gmail.com>
This commit is contained in:
Keith Starling
2015-11-02 15:23:08 -05:00
parent 10d50a0959
commit 5da80098c9
2 changed files with 10 additions and 4 deletions

View File

@@ -30,8 +30,11 @@ else
echo "Machine $VM already exists in VirtualBox."
fi
echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
VM_STATUS=$($DOCKER_MACHINE status $VM)
if [ "$VM_STATUS" != "Running" ]; then
echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
fi
echo "Setting environment variables for machine $VM..."
clear

View File

@@ -34,8 +34,11 @@ else
echo "Machine $VM already exists in VirtualBox."
fi
echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
VM_STATUS=$($DOCKER_MACHINE status $VM)
if [ "$VM_STATUS" != "Running" ]; then
echo "Starting machine $VM..."
$DOCKER_MACHINE start $VM
fi
echo "Setting environment variables for machine $VM..."
eval "$($DOCKER_MACHINE env --shell=bash $VM)"