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

Function createFromExistingContext

cli/command/context/create.go:132–142  ·  view source on GitHub ↗
(s store.ReaderWriter, name string, fromContextName string, opts createOptions)

Source from the content-addressed store, hash-verified

130}
131
132func createFromExistingContext(s store.ReaderWriter, name string, fromContextName string, opts createOptions) error {
133 if len(opts.endpoint) != 0 {
134 return errors.New("cannot use --docker flag when --from is set")
135 }
136 reader := store.Export(fromContextName, &descriptionDecorator{
137 Reader: s,
138 description: opts.description,
139 })
140 defer reader.Close()
141 return store.Import(name, s, reader)
142}
143
144type descriptionDecorator struct {
145 store.Reader

Callers 1

runCreateFunction · 0.85

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…