From 66e595b48055b493077d59b9364ffe18dc5c7146 Mon Sep 17 00:00:00 2001 From: Johannes Scheuermann Date: Wed, 22 Jun 2016 14:40:55 +0200 Subject: [PATCH] Add support for Docker for MacOS --- build/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/common.sh b/build/common.sh index 5decf6b197f..67de4aa7eaa 100755 --- a/build/common.sh +++ b/build/common.sh @@ -170,10 +170,14 @@ function kube::build::verify_prereqs() { function kube::build::docker_available_on_osx() { if [[ -z "${DOCKER_HOST}" ]]; then + if [[ -S "/var/run/docker.sock" ]]; then + kube::log::status "Using Docker for MacOS" + return 0 + fi + kube::log::status "No docker host is set. Checking options for setting one..." - if [[ -z "$(which docker-machine)" && -z "$(which boot2docker)" ]]; then - kube::log::status "It looks like you're running Mac OS X, and neither docker-machine or boot2docker are nowhere to be found." + kube::log::status "It looks like you're running Mac OS X, and neither Docker for Mac, docker-machine or boot2docker are nowhere to be found." kube::log::status "See: https://docs.docker.com/machine/ for installation instructions." return 1 elif [[ -n "$(which docker-machine)" ]]; then