cwltool.docker

Enables Docker software containers via the {u,}docker or podman runtimes.

Classes

DockerCommandLineJob

Runs a CommandLineJob in a software container using the Docker engine.

PodmanCommandLineJob

Runs a CommandLineJob in a software container using the podman engine.

Module Contents

class cwltool.docker.DockerCommandLineJob(builder, joborder, make_path_mapper, requirements, hints, name)

Bases: cwltool.job.ContainerCommandLineJob

Inheritance diagram of cwltool.docker.DockerCommandLineJob

Runs a CommandLineJob in a software container using the Docker engine.

Parameters:
docker_exec = 'docker'
get_image(docker_requirement, pull_image, force_pull, tmp_outdir_prefix)

Retrieve the relevant Docker container image.

Returns:

True upon success

Parameters:
Return type:

bool

get_from_requirements(r, pull_image, force_pull, tmp_outdir_prefix, image_base_path=None)
Parameters:
  • r (cwl_utils.types.CWLObjectType)

  • pull_image (bool)

  • force_pull (bool)

  • tmp_outdir_prefix (str)

  • image_base_path (str | None)

Return type:

str | None

static append_volume(runtime, source, target, writable=False, skip_mkdirs=False)

Add binding arguments to the runtime list.

Parameters:
Return type:

None

add_file_or_directory_volume(runtime, volume, host_outdir_tgt)

Append volume a file/dir mapping to the runtime option list.

Parameters:
Return type:

None

add_writable_file_volume(runtime, volume, host_outdir_tgt, tmpdir_prefix)

Append a writable file mapping to the runtime option list.

Parameters:
Return type:

None

add_writable_directory_volume(runtime, volume, host_outdir_tgt, tmpdir_prefix)

Append a writable directory mapping to the runtime option list.

Parameters:
Return type:

None

create_runtime(env, runtimeContext)

Return the list of commands to run the selected container engine.

Parameters:
Return type:

tuple[list[str], str | None]

class cwltool.docker.PodmanCommandLineJob(builder, joborder, make_path_mapper, requirements, hints, name)

Bases: DockerCommandLineJob

Inheritance diagram of cwltool.docker.PodmanCommandLineJob

Runs a CommandLineJob in a software container using the podman engine.

Parameters:
docker_exec = 'podman'