1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
10 "git.arvados.org/arvados.git/sdk/go/arvados"
13 type bindmount struct {
18 type containerSpec struct {
24 BindMounts map[string]bindmount
29 NetworkMode string // docker network mode, normally "default"
36 // containerExecutor is an interface to a container runtime
37 // (docker/singularity).
38 type containerExecutor interface {
39 // ImageLoad loads the image from the given tarball such that
40 // it can be used to create/start a container.
41 LoadImage(imageID string, imageTarballPath string, container arvados.Container, keepMount string,
42 containerClient *arvados.Client) error
44 // Wait for the container process to finish, and return its
45 // exit code. If applicable, also remove the stopped container
47 Wait(context.Context) (int, error)
49 // Create a container, but don't start it yet.
50 Create(containerSpec) error
52 // Start the container
55 // Process ID of a process in the container. Return 0 if
56 // container is finished or no process has started yet.
59 // Stop the container immediately
62 // Release resources (temp dirs, stopped containers)
65 // Name and version of runtime engine ("docker 20.10.16", "singularity-ce version 3.9.9")