$ docker-machine create -d virtualbox --virtualbox-disk-size "200000" --virtualbox-memory 4096 --virtualbox-hostonly-cidr "192.168.90.1/24" default
$ docker-machine upgrade default
$ eval "$(docker-machine env default)"
$ docker build -t uber/android-build-environment .
$ cd /path/to/your/android/source/root
$ docker run -i -v $PWD:/project -t uber/android-build-environment /bin/bash /project/ci/build.sh
Stop the docker-machine vm:
$ docker-machine stop default
Then connect to your VPN and restart the docker vm:
$ docker-machine start default
$ eval "$(docker-machine env default)"