Merge pull request #131 from bgruening/ie_docker_inject_cmd

Add `command_inject` to Interactive Environments.
This commit is contained in:
John Chilton
2015-04-19 19:43:58 -05:00
2 changed files with 12 additions and 4 deletions
@@ -7,9 +7,16 @@
#ssl = False
[docker]
# Command to execute docker. For example `sudo docker` or `docker-lxc`.
command = docker
# The docker image name that should be started.
image = bgruening/docker-ipython-notebook
# Additional arguments that are passed to the `docker run` command.
command_inject = --sig-proxy=true
# URL to access the Galaxy API with from the spawn Docker containter, if empty
# this falls back to galaxy.ini's galaxy_infrastructure_url and finally to the
# Docker host of the spawned container if that is also not set.
@@ -164,7 +164,8 @@ class InteractiveEnviornmentRequest(object):
"""
Generate and return the docker command to execute
"""
return '%s run -d -u %s --sig-proxy=true -p %s:%s -v "%s:/import/" %s' % \
(self.attr.viz_config.get("docker", "command"), os.geteuid(),
self.attr.PORT, self.attr.docker_port,
temp_dir, self.attr.viz_config.get("docker", "image"))
return '%s run -d %s -p %s:%s -v "%s:/import/" %s' % \
(self.attr.viz_config.get("docker", "command"),
self.attr.viz_config.get("docker", "command_inject"),
self.attr.PORT, self.attr.docker_port,
temp_dir, self.attr.viz_config.get("docker", "image"))