From 459752043a05753b81d423cb6b4fce252e6a2cb8 Mon Sep 17 00:00:00 2001 From: Jacob Callahan Date: Thu, 8 Aug 2024 14:23:02 -0400 Subject: [PATCH] Quick fix for docker ssh connection This time correctly accounting for multiple connection options in the Docker bind, allowing ssh (which is what most people are currently using) to work. --- broker/binds/containers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/broker/binds/containers.py b/broker/binds/containers.py index a574d9d..064ec42 100644 --- a/broker/binds/containers.py +++ b/broker/binds/containers.py @@ -198,6 +198,8 @@ def __init__(self, port=2375, **kwargs): self._ClientClass = DockerClient if self.host == "localhost": self.uri = "unix://var/run/docker.sock" + elif kwargs.get("port") == SSH_PORT: + self.uri = "ssh://{username}@{host}:{port}".format(**kwargs) else: self.uri = "tcp://{username}@{host}".format(**kwargs)