From 610f90cf5bb5cb06e83c5c281febcb31c989dc7b Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 8 Feb 2024 11:11:05 +0100 Subject: [PATCH 1/2] add option to pass extra args to docker run --- planemo/galaxy/config.py | 2 ++ planemo/options.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/planemo/galaxy/config.py b/planemo/galaxy/config.py index 4ec468175..570f077eb 100644 --- a/planemo/galaxy/config.py +++ b/planemo/galaxy/config.py @@ -130,6 +130,7 @@ ${docker_sudo_cmd} ${docker_cmd} ${docker_volumes} + ${docker_host_param} @@ -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) diff --git a/planemo/options.py b/planemo/options.py index 03f5eb3c1..8a61578e1 100644 --- a/planemo/options.py +++ b/planemo/options.py @@ -955,6 +955,14 @@ 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( @@ -962,6 +970,7 @@ def docker_config_options(): docker_sudo_option(), docker_host_option(), docker_sudo_cmd_option(), + docker_run_extra_arguments_option(), ) From 08eaf62dcb22217146f0d387cd8a25a0f2703d61 Mon Sep 17 00:00:00 2001 From: M Bernt Date: Thu, 8 Feb 2024 14:15:18 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Marius van den Beek --- planemo/options.py | 1 + 1 file changed, 1 insertion(+) diff --git a/planemo/options.py b/planemo/options.py index 8a61578e1..c17069787 100644 --- a/planemo/options.py +++ b/planemo/options.py @@ -955,6 +955,7 @@ def docker_host_option(): default=docker_util.DEFAULT_HOST, ) + def docker_run_extra_arguments_option(): return planemo_option( "--docker_run_extra_arguments",