Skip to content

Commit

Permalink
Revert command inject and document rationale
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Sep 23, 2015
1 parent 52dfd58 commit 56ac2c0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
Expand Up @@ -9,11 +9,19 @@
# Command to launch docker container. For example `sudo docker` or `docker-lxc`.
# If you need to use a command like `sg` you can do that here, just be sure to
# wrap all of the docker portion in single quotes. E.g. `sg 'docker' 'docker {docker_args}'`
command = docker run --sig-proxy=true -e DEBUG=false {docker_args}
#
# It is recommended that you use command_inject if you need to inject
# additional parameters. This command string is re-used for a `docker inspect`
# command and will likely cause errors if it is extensively modified, past the
# usual group/sudo changes.
command = docker run {docker_args}

# The docker image name that should be started.
image = bgruening/docker-ipython-notebook:dev

# Additional arguments that are passed to the `docker run` command.
command_inject = --sig-proxy=true -e DEBUG=false

# 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.
Expand Down
Expand Up @@ -10,11 +10,19 @@ password_auth = True
# Command to launch docker container. For example `sudo docker` or `docker-lxc`.
# If you need to use a command like `sg` you can do that here, just be sure to
# wrap all of the docker portion in single quotes. E.g. `sg 'docker' 'docker {docker_args}'`
command = docker run --sig-proxy=true -e DEBUG=false {docker_args}
#
# It is recommended that you use command_inject if you need to inject
# additional parameters. This command string is re-used for a `docker inspect`
# command and will likely cause errors if it is extensively modified, past the
# usual group/sudo changes.
command = docker run {docker_args}

# The docker image name that should be started.
image = erasche/docker-rstudio-notebook:dev

# Additional arguments that are passed to the `docker run` command.
command_inject = --sig-proxy=true -e DEBUG=false

# 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.
Expand Down
4 changes: 3 additions & 1 deletion lib/galaxy/web/base/interactive_environments.py
Expand Up @@ -65,6 +65,7 @@ def load_deploy_config(self, default_dict={}):
# will need to be recorded here. The ConfigParser doesn't provide a
# .get() that will ignore missing sections, so we must make use of
# their defaults dictionary instead.
default_dict['command_inject'] = '--sig-proxy=true'
default_dict['docker_hostname'] = 'localhost'
default_dict['wx_tempdir'] = 'False'
default_dict['command_wrapper'] = ''
Expand Down Expand Up @@ -187,9 +188,10 @@ def docker_cmd(self, env_override={}, volumes=[]):
# Then we format in the entire docker command in place of
# {docker_args}, so as to let the admin not worry about which args are
# getting passed
command = command.format(docker_args='{environment} -d -p {port_ext}:{port_int} -v "{temp_dir}:/import/" {volume_str} {image}')
command = command.format(docker_args='{command_inject} {environment} -d -p {port_ext}:{port_int} -v "{temp_dir}:/import/" {volume_str} {image}')
# Once that's available, we format again with all of our arguments
command = command.format(
command_inject=self.attr.viz_config.get("docker", "command_inject"),
environment=env_str,
port_ext=self.attr.PORT,
port_int=self.attr.docker_port,
Expand Down

0 comments on commit 56ac2c0

Please sign in to comment.