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:
@@ -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
|
||||
|
||||
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user