MCPcopy Index your code
hub / github.com/docker/cli / dockerMain

Function dockerMain

cmd/docker/docker.go:82–94  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

80}
81
82func dockerMain(ctx context.Context) error {
83 ctx, cancelNotify := notifyContext(ctx, platformsignals.TerminationSignals...)
84 defer cancelNotify()
85
86 dockerCli, err := command.NewDockerCli(command.WithBaseContext(ctx))
87 if err != nil {
88 return err
89 }
90 logrus.SetOutput(dockerCli.Err())
91 otel.SetErrorHandler(debug.OTELErrorHandler)
92
93 return runDocker(ctx, dockerCli)
94}
95
96// getExitCode returns the exit-code to use for the given error.
97// If err is a [cli.StatusError] and has a StatusCode set, it uses the

Callers 1

mainFunction · 0.85

Calls 3

ErrMethod · 0.95
notifyContextFunction · 0.85
runDockerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…