Universally point to the host docker daemon

pull/6917/head
Thomas Stromberg 2020-03-06 12:04:32 -08:00
parent 170f57737f
commit 882d1aeab3
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,7 @@ import (
"github.com/spf13/viper"
"k8s.io/kubectl/pkg/util/templates"
configCmd "k8s.io/minikube/cmd/minikube/cmd/config"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/exit"
@ -99,6 +100,11 @@ func Execute() {
addToPath(targetDir)
}
// Universally ensure that we never speak to the wrong DOCKER_HOST
if err := oci.PointToHostDockerDaemon(); err != nil {
glog.Errorf("oci env: %v", err)
}
if err := RootCmd.Execute(); err != nil {
// Cobra already outputs the error, typically because the user provided an unknown command.
os.Exit(exit.BadUsage)