libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [1/2] libcloud git commit: Add network mode and labels when creating containers within docker driver Closes #831
Date Tue, 05 Jul 2016 09:15:30 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 5cea658c9 -> 6f695001b


Add network mode and labels when creating containers within docker driver
Closes #831


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/e1477211
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/e1477211
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/e1477211

Branch: refs/heads/trunk
Commit: e1477211cb67df31a14161d94c8ed3fbb53f0459
Parents: 5cea658
Author: Jamie Cressey <jamiecressey89@gmail.com>
Authored: Sun Jul 3 11:12:59 2016 +0100
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Tue Jul 5 19:14:24 2016 +1000

----------------------------------------------------------------------
 libcloud/container/drivers/docker.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/e1477211/libcloud/container/drivers/docker.py
----------------------------------------------------------------------
diff --git a/libcloud/container/drivers/docker.py b/libcloud/container/drivers/docker.py
index 3143f8e..880618b 100644
--- a/libcloud/container/drivers/docker.py
+++ b/libcloud/container/drivers/docker.py
@@ -296,7 +296,8 @@ class DockerContainerDriver(ContainerDriver):
                          volumes=None, volumes_from=None,
                          network_disabled=False, entrypoint=None,
                          cpu_shares=None, working_dir='', domainname=None,
-                         memswap_limit=0, port_bindings=None):
+                         memswap_limit=0, port_bindings=None,
+                         network_mode='bridge', labels=None):
         """
         Deploy an installed container image
 
@@ -348,6 +349,8 @@ class DockerContainerDriver(ContainerDriver):
             'MemorySwap': memswap_limit,
             'PublishAllPorts': True,
             'PortBindings': port_bindings,
+            'NetworkMode': network_mode,
+            'Labels': labels,
         }
 
         data = json.dumps(payload)


Mime
View raw message