mirror of https://github.com/docker/docs.git
set -e on windows
This commit is contained in:
parent
45540619f5
commit
0bec920046
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ISO=$HOME/.docker/machine/cache/boot2docker.iso
|
||||
VM=dev
|
||||
DOCKER_MACHINE=./docker-machine.exe
|
||||
|
|
@ -9,10 +12,10 @@ if [ ! -f $ISO ]; then
|
|||
cp ./boot2docker.iso "$ISO"
|
||||
fi
|
||||
|
||||
machine=$($DOCKER_MACHINE ls -q | grep "^$VM$")
|
||||
machine=$($DOCKER_MACHINE ls -q | grep "^$VM$") || :
|
||||
if [ -z $machine ]; then
|
||||
echo "Creating Machine $VM..."
|
||||
$DOCKER_MACHINE create -d virtualbox --virtualbox-memory 2048 $VM
|
||||
$DOCKER_MACHINE create -d virtualbox --virtualbox-memory 2048 $VM
|
||||
else
|
||||
echo "Machine $VM already exists."
|
||||
fi
|
||||
|
|
@ -26,8 +29,8 @@ echo "Setting environment variables for machine $VM..."
|
|||
eval "$(./docker-machine.exe env $VM 2>/dev/null | sed 's,\\,\\\\,g')"
|
||||
|
||||
cd
|
||||
clear
|
||||
|
||||
clear
|
||||
cat << EOF
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue