1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
10 dockertypes "github.com/docker/docker/api/types"
11 dockercontainer "github.com/docker/docker/api/types/container"
12 dockernetwork "github.com/docker/docker/api/types/network"
13 "golang.org/x/net/context"
16 // ThinDockerClient is the minimal Docker client interface used by crunch-run.
17 type ThinDockerClient interface {
18 ContainerAttach(ctx context.Context, container string, options dockertypes.ContainerAttachOptions) (dockertypes.HijackedResponse, error)
19 ContainerCreate(ctx context.Context, config *dockercontainer.Config, hostConfig *dockercontainer.HostConfig,
20 networkingConfig *dockernetwork.NetworkingConfig, containerName string) (dockercontainer.ContainerCreateCreatedBody, error)
21 ContainerStart(ctx context.Context, container string, options dockertypes.ContainerStartOptions) error
22 ContainerRemove(ctx context.Context, container string, options dockertypes.ContainerRemoveOptions) error
23 ContainerWait(ctx context.Context, container string, condition dockercontainer.WaitCondition) (<-chan dockercontainer.ContainerWaitOKBody, <-chan error)
24 ContainerInspect(ctx context.Context, id string) (dockertypes.ContainerJSON, error)
25 ImageInspectWithRaw(ctx context.Context, image string) (dockertypes.ImageInspect, []byte, error)
26 ImageLoad(ctx context.Context, input io.Reader, quiet bool) (dockertypes.ImageLoadResponse, error)
27 ImageRemove(ctx context.Context, image string, options dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error)