Skip to content

Commit

Permalink
add option to pass extra args to docker run
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Feb 8, 2024
1 parent 023c758 commit 610f90c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planemo/galaxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
<param id="docker_sudo_cmd">${docker_sudo_cmd}</param>
<param id="docker_cmd">${docker_cmd}</param>
<param id="docker_volumes">${docker_volumes}</param>
<param id="docker_run_extra_arguments"><![CDATA[${docker_run_extra_arguments}]]></param>
${docker_host_param}
</destination>
<destination id="upload_dest" runner="planemo_runner">
Expand Down Expand Up @@ -1363,6 +1364,7 @@ def _handle_job_config_file(
"docker_cmd": str(kwds.get("docker_cmd", docker_util.DEFAULT_DOCKER_COMMAND)),
"docker_host_param": docker_host_param,
"docker_volumes": docker_volumes_str,
"docker_run_extra_arguments": kwds.get("docker_run_extra_arguments", ""),
}
)
write_file(job_config_file, conf_contents)
Expand Down
9 changes: 9 additions & 0 deletions planemo/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,13 +955,22 @@ def docker_host_option():
default=docker_util.DEFAULT_HOST,
)

def docker_run_extra_arguments_option():
return planemo_option(
"--docker_run_extra_arguments",
help="Extra arguments to pass to docker run.",
use_global_config=True,
default="",
)


def docker_config_options():
return _compose(
docker_cmd_option(),
docker_sudo_option(),
docker_host_option(),
docker_sudo_cmd_option(),
docker_run_extra_arguments_option(),
)


Expand Down

0 comments on commit 610f90c

Please sign in to comment.