MCPcopy
hub / github.com/docker/compose / ContainerCreate

Method ContainerCreate

pkg/dryrun/dryrunclient.go:96–107  ·  view source on GitHub ↗
(ctx context.Context, options client.ContainerCreateOptions)

Source from the content-addressed store, hash-verified

94}
95
96func (d *DryRunClient) ContainerCreate(ctx context.Context, options client.ContainerCreateOptions) (client.ContainerCreateResult, error) {
97 d.containers = append(d.containers, containerType.Summary{
98 ID: options.Name,
99 Names: []string{options.Name},
100 Labels: options.Config.Labels,
101 HostConfig: struct {
102 NetworkMode string `json:",omitempty"`
103 Annotations map[string]string `json:",omitempty"`
104 }{},
105 })
106 return client.ContainerCreateResult{ID: options.Name}, nil
107}
108
109func (d *DryRunClient) ContainerInspect(ctx context.Context, container string, options client.ContainerInspectOptions) (client.ContainerInspectResult, error) {
110 containerJSON, err := d.apiClient.ContainerInspect(ctx, container, options)

Calls

no outgoing calls