Skip to content

Commit

Permalink
Merge pull request #4307 from afbjorklund/docker-cr-version
Browse files Browse the repository at this point in the history
Make sure to start Docker, before getting version
  • Loading branch information
tstromberg authored May 21, 2019
2 parents af443fc + f2fc33d commit 8a25410
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,15 @@ func runStart(cmd *cobra.Command, args []string) {
exit.WithError("Failed to get command runner", err)
}

cr := configureRuntimes(runner, k8sVersion)
cr := configureRuntimes(runner)
version, _ := cr.Version()
console.OutStyle(cr.Name(), "Configuring environment for Kubernetes %s on %s %s", k8sVersion, cr.Name(), version)
for _, v := range dockerOpt {
console.OutStyle("option", "opt %s", v)
}
for _, v := range dockerEnv {
console.OutStyle("option", "env %s", v)
}

// prepareHostEnvironment uses the downloaded images, so we need to wait for background task completion.
waitCacheImages(&cacheGroup)
Expand Down Expand Up @@ -637,20 +645,12 @@ func updateKubeConfig(h *host.Host, c *cfg.Config) *pkgutil.KubeConfigSetup {
}

// configureRuntimes does what needs to happen to get a runtime going.
func configureRuntimes(runner cruntime.CommandRunner, k8sVersion string) cruntime.Manager {
func configureRuntimes(runner cruntime.CommandRunner) cruntime.Manager {
config := cruntime.Config{Type: viper.GetString(containerRuntime), Runner: runner}
cr, err := cruntime.New(config)
if err != nil {
exit.WithError(fmt.Sprintf("Failed runtime for %+v", config), err)
}
version, _ := cr.Version()
console.OutStyle(cr.Name(), "Configuring environment for Kubernetes %s on %s %s", k8sVersion, cr.Name(), version)
for _, v := range dockerOpt {
console.OutStyle("option", "opt %s", v)
}
for _, v := range dockerEnv {
console.OutStyle("option", "env %s", v)
}

err = cr.Enable()
if err != nil {
Expand Down

0 comments on commit 8a25410

Please sign in to comment.