mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 11:42:14 +00:00
Support remote docker hosts on OS X.
This commit brings two main changes, notably: Two new options that can be set as environment variables - DOCKER_OPTS: any arbitrary set of docker options. Example: --tlsverify - DOCKER_NATIVE: This forces the use of the native docker available. This is most useful if you're on OS X and do not want to use boot2docker. Now uses 'docker cp' instead of tar piping to transfer files. This currently must be done by copying the binaries off of the docker volume and into a local filesystem (/tmp) before a docker cp is done. This workaround will no longer be necessary after bug fix https://github.com/docker/docker/pull/8509 makes it into stable. This was necessary because the tar | tar method was creating corrupted archives on OS X even with the < /dev/null workaround.
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
# This command builds and runs a local kubernetes cluster. It's just like
|
||||
# local-up.sh, but this one launches the three separate binaries.
|
||||
# You may need to run this as root to allow kubelet to open docker's socket.
|
||||
DOCKER_OPTS=${DOCKER_OPTS:-""}
|
||||
DOCKER_NATIVE=${DOCKER_NATIVE:-""}
|
||||
DOCKER=(docker ${DOCKER_OPTS})
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
cd "${KUBE_ROOT}"
|
||||
@@ -27,7 +30,7 @@ set -e
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
"${KUBE_ROOT}/hack/build-go.sh"
|
||||
|
||||
docker ps 2> /dev/null 1> /dev/null
|
||||
${DOCKER[@]} ps 2> /dev/null 1> /dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to successfully run 'docker ps', please verify that docker is installed and \$DOCKER_HOST is set correctly."
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user