Loading lib/galaxy/config/sample/job_conf.sample.yml +5 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,11 @@ execution: # Following command can be used to tweak docker command. #docker_cmd: /usr/local/custom_docker/docker # Docker containers that expose ports (e.g. Interactive Tools) can # optionally use a command to determine the host port that is exposed. By # default, one is chosen at random (docker run -p <guest_port> ...). #docker_host_port_cmd: # Following can be used to connect to docker server in different # ways (translated as -H argument to docker client). #docker_host: unix:///var/run/docker.sock Loading lib/galaxy/tool_util/deps/container_classes.py +1 −0 Original line number Diff line number Diff line Loading @@ -481,6 +481,7 @@ class DockerContainer(Container, HasDockerLikeVolumes): set_user=self.prop("set_user", docker_util.DEFAULT_SET_USER), run_extra_arguments=self.prop("run_extra_arguments", docker_util.DEFAULT_RUN_EXTRA_ARGUMENTS), guest_ports=self.tool_info.guest_ports, host_port_cmd=self.prop("host_port_cmd", None), container_name=self.container_name, **docker_host_props, ) Loading lib/galaxy/tool_util/deps/docker_util.py +6 −1 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ def build_docker_run_command( set_user: Optional[str] = DEFAULT_SET_USER, host: Optional[str] = DEFAULT_HOST, guest_ports: Union[bool, str, List[str]] = False, host_port_cmd: Optional[str] = None, container_name: Optional[str] = None, ) -> str: env_directives = env_directives or [] Loading @@ -129,10 +130,14 @@ def build_docker_run_command( # When is True, expose all ports command_parts.append("-P") elif guest_ports: if host_port_cmd: host_port_cmd = f"$({host_port_cmd}):" else: host_port_cmd = "" if not isinstance(guest_ports, list): guest_ports = [guest_ports] for guest_port in guest_ports: command_parts.extend(["-p", guest_port]) command_parts.extend(["-p", f"{host_port_cmd}{guest_port}"]) if container_name: command_parts.extend(["--name", container_name]) for volume in volumes: Loading Loading
lib/galaxy/config/sample/job_conf.sample.yml +5 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,11 @@ execution: # Following command can be used to tweak docker command. #docker_cmd: /usr/local/custom_docker/docker # Docker containers that expose ports (e.g. Interactive Tools) can # optionally use a command to determine the host port that is exposed. By # default, one is chosen at random (docker run -p <guest_port> ...). #docker_host_port_cmd: # Following can be used to connect to docker server in different # ways (translated as -H argument to docker client). #docker_host: unix:///var/run/docker.sock Loading
lib/galaxy/tool_util/deps/container_classes.py +1 −0 Original line number Diff line number Diff line Loading @@ -481,6 +481,7 @@ class DockerContainer(Container, HasDockerLikeVolumes): set_user=self.prop("set_user", docker_util.DEFAULT_SET_USER), run_extra_arguments=self.prop("run_extra_arguments", docker_util.DEFAULT_RUN_EXTRA_ARGUMENTS), guest_ports=self.tool_info.guest_ports, host_port_cmd=self.prop("host_port_cmd", None), container_name=self.container_name, **docker_host_props, ) Loading
lib/galaxy/tool_util/deps/docker_util.py +6 −1 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ def build_docker_run_command( set_user: Optional[str] = DEFAULT_SET_USER, host: Optional[str] = DEFAULT_HOST, guest_ports: Union[bool, str, List[str]] = False, host_port_cmd: Optional[str] = None, container_name: Optional[str] = None, ) -> str: env_directives = env_directives or [] Loading @@ -129,10 +130,14 @@ def build_docker_run_command( # When is True, expose all ports command_parts.append("-P") elif guest_ports: if host_port_cmd: host_port_cmd = f"$({host_port_cmd}):" else: host_port_cmd = "" if not isinstance(guest_ports, list): guest_ports = [guest_ports] for guest_port in guest_ports: command_parts.extend(["-p", guest_port]) command_parts.extend(["-p", f"{host_port_cmd}{guest_port}"]) if container_name: command_parts.extend(["--name", container_name]) for volume in volumes: Loading