docker_container: pass networks to Daemon on container creation (#933)

* Pass networks to Daemon on container creation.

* Restore old behavior, and only provide all networks on creation for API 1.44+.
This commit is contained in:
Felix Fontein
2024-07-23 17:34:26 +02:00
committed by GitHub
parent 11ce793f7d
commit 2ddadf1e2b
5 changed files with 50 additions and 6 deletions
@@ -299,8 +299,11 @@ class EngineDriver(object):
def connect_container_to_network(self, client, container_id, network_id, parameters=None):
pass
def create_container_supports_more_than_one_network(self, client):
return False
@abc.abstractmethod
def create_container(self, client, container_name, create_parameters):
def create_container(self, client, container_name, create_parameters, networks=None):
pass
@abc.abstractmethod