MCPcopy
hub / github.com/moby/moby / Run

Function Run

integration/internal/container/container.go:87–95  ·  view source on GitHub ↗

Run creates and start a container with the specified options

(ctx context.Context, t *testing.T, apiClient client.APIClient, ops ...func(*TestContainerConfig))

Source from the content-addressed store, hash-verified

85
86// Run creates and start a container with the specified options
87func Run(ctx context.Context, t *testing.T, apiClient client.APIClient, ops ...func(*TestContainerConfig)) string {
88 t.Helper()
89 id := Create(ctx, t, apiClient, ops...)
90
91 _, err := apiClient.ContainerStart(ctx, id, client.ContainerStartOptions{})
92 assert.NilError(t, err)
93
94 return id
95}
96
97type RunResult struct {
98 ContainerID string

Calls 3

CreateFunction · 0.70
HelperMethod · 0.65
ContainerStartMethod · 0.65