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

Function runExport

cli/command/context/export.go:62–69  ·  view source on GitHub ↗

runExport exports a Docker context.

(dockerCLI command.Cli, contextName string, dest string)

Source from the content-addressed store, hash-verified

60
61// runExport exports a Docker context.
62func runExport(dockerCLI command.Cli, contextName string, dest string) error {
63 if err := store.ValidateContextName(contextName); err != nil && contextName != command.DefaultContextName {
64 return err
65 }
66 reader := store.Export(contextName, dockerCLI.ContextStore())
67 defer reader.Close()
68 return writeTo(dockerCLI, reader, dest)
69}

Callers 4

newExportCommandFunction · 0.70
TestExportImportWithFileFunction · 0.70
TestExportImportPipeFunction · 0.70
TestExportExistingFileFunction · 0.70

Calls 3

writeToFunction · 0.85
ContextStoreMethod · 0.65
CloseMethod · 0.45

Tested by 3

TestExportImportWithFileFunction · 0.56
TestExportImportPipeFunction · 0.56
TestExportExistingFileFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…