MCPcopy
hub / github.com/containerd/containerd / WithImage

Function WithImage

client/container_opts.go:90–95  ·  view source on GitHub ↗

WithImage sets the provided image as the base for the container

(i Image)

Source from the content-addressed store, hash-verified

88
89// WithImage sets the provided image as the base for the container
90func WithImage(i Image) NewContainerOpts {
91 return func(ctx context.Context, client *Client, c *containers.Container) error {
92 c.Image = i.Name()
93 return nil
94 }
95}
96
97// WithImageName allows setting the image name as the base for the container
98func WithImageName(n string) NewContainerOpts {

Callers 1

TestContainerImageFunction · 0.50

Calls 1

NameMethod · 0.65

Tested by 1

TestContainerImageFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…