daemon_none.go 444 B

123456789101112131415161718192021222324252627
  1. // +build !daemon
  2. package main
  3. import (
  4. "fmt"
  5. "runtime"
  6. "strings"
  7. "github.com/spf13/cobra"
  8. )
  9. func newDaemonCommand() *cobra.Command {
  10. return &cobra.Command{
  11. Use: "daemon",
  12. Hidden: true,
  13. RunE: func(cmd *cobra.Command, args []string) error {
  14. return runDaemon()
  15. },
  16. }
  17. }
  18. func runDaemon() error {
  19. return fmt.Errorf(
  20. "`docker daemon` is not supported on %s. Please run `dockerd` directly",
  21. strings.Title(runtime.GOOS))
  22. }