commit/galaxy-central: jmchilton: Allow passing extra parameter to docker run command in job_conf.xml.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/ebceda0721f3/ Changeset: ebceda0721f3 User: jmchilton Date: 2014-11-24 17:24:21+00:00 Summary: Allow passing extra parameter to docker run command in job_conf.xml. As request in the following thread http://dev.list.galaxyproject.org/more-control-over-the-quot-docker-quot-com.... Affected #: 3 files diff -r 3edc85f4761bbcde996470590cc002828ce21d03 -r ebceda0721f3f3215447c19f94525f06f164afd1 config/job_conf.xml.sample_advanced --- a/config/job_conf.xml.sample_advanced +++ b/config/job_conf.xml.sample_advanced @@ -204,6 +204,9 @@ remote job user. Leave empty to not use the -u argument with Docker. --><!-- <param id="docker_set_user">$UID</param> --> + <!-- Pass extra arguments to the docker run command not covered by the + above options (e.g. --link server:server) --> + <!-- <param id="docker_run_extra_arguments"></param> --><!-- Following command can be used to tweak docker command. --><!-- <param id="docker_cmd">/usr/local/custom_docker/docker</param> --><!-- Following can be used to connect to docke server in different diff -r 3edc85f4761bbcde996470590cc002828ce21d03 -r ebceda0721f3f3215447c19f94525f06f164afd1 lib/galaxy/tools/deps/containers.py --- a/lib/galaxy/tools/deps/containers.py +++ b/lib/galaxy/tools/deps/containers.py @@ -245,6 +245,7 @@ net=prop("net", "none"), # By default, docker instance has networking disabled auto_rm=asbool(prop("auto_rm", docker_util.DEFAULT_AUTO_REMOVE)), set_user=prop("set_user", docker_util.DEFAULT_SET_USER), + run_extra_arguments=prop("run_extra_arguments", docker_util.DEFAULT_RUN_EXTRA_ARGUMENTS), **docker_host_props ) return "%s\n%s" % (cache_command, run_command) diff -r 3edc85f4761bbcde996470590cc002828ce21d03 -r ebceda0721f3f3215447c19f94525f06f164afd1 lib/galaxy/tools/deps/docker_util.py --- a/lib/galaxy/tools/deps/docker_util.py +++ b/lib/galaxy/tools/deps/docker_util.py @@ -11,6 +11,7 @@ DEFAULT_VOLUMES_FROM = None DEFAULT_AUTO_REMOVE = True DEFAULT_SET_USER = "$UID" +DEFAULT_RUN_EXTRA_ARGUMENTS = None class DockerVolume(object): @@ -116,6 +117,7 @@ working_directory=DEFAULT_WORKING_DIRECTORY, name=None, net=DEFAULT_NET, + run_extra_arguments=DEFAULT_RUN_EXTRA_ARGUMENTS, docker_cmd=DEFAULT_DOCKER_COMMAND, sudo=DEFAULT_SUDO, sudo_cmd=DEFAULT_SUDO_COMMAND, @@ -148,6 +150,8 @@ command_parts.extend(["--net", net]) if auto_rm: command_parts.append("--rm") + if run_extra_arguments: + command_parts.append(run_extra_arguments) if set_user: user = set_user if set_user == DEFAULT_SET_USER: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org