X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6766d1b04bd238d05890f3ec221c65e84920dde6..c340eecc7a03dd066792e5f046f087b8b3dfced6:/lib/crunchrun/docker.go diff --git a/lib/crunchrun/docker.go b/lib/crunchrun/docker.go index 05e540da80..656061b77e 100644 --- a/lib/crunchrun/docker.go +++ b/lib/crunchrun/docker.go @@ -46,13 +46,15 @@ func newDockerExecutor(containerUUID string, logf func(string, ...interface{}), }, err } -func (e *dockerExecutor) ImageLoaded(imageID string) bool { +func (e *dockerExecutor) LoadImage(imageID string, imageTarballPath string, container arvados.Container, arvMountPoint string, + containerClient *arvados.Client) error { _, _, err := e.dockerclient.ImageInspectWithRaw(context.TODO(), imageID) - return err == nil -} + if err == nil { + // already loaded + return nil + } -func (e *dockerExecutor) LoadImage(filename string) error { - f, err := os.Open(filename) + f, err := os.Open(imageTarballPath) if err != nil { return err } @@ -253,6 +255,3 @@ func (e *dockerExecutor) handleStdoutStderr(stdout, stderr io.Writer, reader io. func (e *dockerExecutor) Close() { e.dockerclient.ContainerRemove(context.TODO(), e.containerID, dockertypes.ContainerRemoveOptions{Force: true}) } - -func (e *dockerExecutor) SetArvadoClient(containerClient *arvados.Client, container arvados.Container) { -}