Ben Firshman 12 rokov pred
rodič
commit
6a2d528d2e
2 zmenil súbory, kde vykonal 7 pridanie a 2 odobranie
  1. 6 1
      plum/service.py
  2. 1 1
      requirements.txt

+ 6 - 1
plum/service.py

@@ -34,10 +34,15 @@ class Service(object):
             self.stop_container()
             self.stop_container()
 
 
     def start_container(self, **override_options):
     def start_container(self, **override_options):
-        container = self.client.create_container(**self._get_container_options(override_options))
+        container_options = self._get_container_options(override_options)
+        container = self.client.create_container(**container_options)
+        port_bindings = {}
+        for port in container_options.get('ports', []):
+            port_bindings[port] = None
         self.client.start(
         self.client.start(
             container['Id'],
             container['Id'],
             links=self._get_links(),
             links=self._get_links(),
+            port_bindings=port_bindings,
         )
         )
         return container['Id']
         return container['Id']
 
 

+ 1 - 1
requirements.txt

@@ -1,3 +1,3 @@
-git+git://github.com/dotcloud/docker-py.git@4fde1a242e1853cbf83e5a36371d8b4a49501c52
+git+git://github.com/dotcloud/docker-py.git@5c928dcab51a276f421a36d584c37b745b3b9a3d
 docopt==0.6.1
 docopt==0.6.1
 PyYAML==3.10
 PyYAML==3.10