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

Function parseRun

cli/command/container/opts_test.go:56–67  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

54}
55
56func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, error) {
57 flags, copts := setupRunFlags()
58 if err := flags.Parse(args); err != nil {
59 return nil, nil, nil, err
60 }
61 // TODO(dnephin): fix tests to accept ContainerConfig; see https://github.com/moby/moby/pull/31621
62 containerCfg, err := parse(flags, copts, runtime.GOOS)
63 if err != nil {
64 return nil, nil, nil, err
65 }
66 return containerCfg.Config, containerCfg.HostConfig, containerCfg.NetworkingConfig, err
67}
68
69func setupRunFlags() (*pflag.FlagSet, *containerOptions) {
70 flags := pflag.NewFlagSet("run", pflag.ContinueOnError)

Callers 15

mustParseFunction · 0.85
TestParseWithMacAddressFunction · 0.85
TestParseWithExposeFunction · 0.85
TestParseDeviceFunction · 0.85
TestParseNetworkConfigFunction · 0.85
TestParseModesFunction · 0.85
TestRunFlagsParseShmSizeFunction · 0.85
TestParseRestartPolicyFunction · 0.85
TestParseHealthFunction · 0.85
TestParseLoggingOptsFunction · 0.85

Calls 2

setupRunFlagsFunction · 0.85
parseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…