Skip to content

Commit

Permalink
Merge pull request #1428 from bernt-matthias/topic/docker-extra-args
Browse files Browse the repository at this point in the history
Add option to pass extra arguments to `docker run`
  • Loading branch information
mvdbeek authored Feb 8, 2024
2 parents 023c758 + 08eaf62 commit e69487c
Show file tree
Hide file tree
Showing 2 changed files with 12 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
10 changes: 10 additions & 0 deletions planemo/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,12 +956,22 @@ def docker_host_option():
)


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 e69487c

Please sign in to comment.