Fix the daemon proxy for cobra commands. Signed-off-by: Daniel Nephin <dnephin@docker.com> Upstream-commit: 0452ff5a4dd1b8fba707235d6f12a4038208f34b Component: engine
27 lines
443 B
Go
27 lines
443 B
Go
// +build !daemon
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/spf13/cobra"
|
|
"runtime"
|
|
"strings"
|
|
)
|
|
|
|
func newDaemonCommand() *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "daemon",
|
|
Hidden: true,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return runDaemon()
|
|
},
|
|
}
|
|
}
|
|
|
|
func runDaemon() error {
|
|
return fmt.Errorf(
|
|
"`docker daemon` is not supported on %s. Please run `dockerd` directly",
|
|
strings.Title(runtime.GOOS))
|
|
}
|