summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Le Marec - Pasquet <kiorky@cryptelium.net>2013-09-30 17:52:23 +0200
committerMathieu Le Marec - Pasquet <kiorky@cryptelium.net>2013-09-30 23:53:47 +0200
commit64f7807fbe76fab91cb8bab60ed56fa3b883ca14 (patch)
tree9bcde5a2739ec8568f5dbd4458f0adae7b53d573
parent26b291bd32d8c53a14fb4bbd68509810860423f2 (diff)
downloaddocker-py-64f7807fbe76fab91cb8bab60ed56fa3b883ca14.tar.gz
Documentation for binds
-rw-r--r--docker/client.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/docker/client.py b/docker/client.py
index eb6df8b..34c91a5 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -231,6 +231,15 @@ class Client(requests.Session):
detach=False, stdin_open=False, tty=False, mem_limit=0, ports=None,
environment=None, dns=None, volumes=None, volumes_from=None,
privileged=False):
+ '''
+ NOTES:
+
+ - To create modifiable volumes at start time, use::
+
+ volumes={"/srv": "" }
+
+ '''
+
config = self._container_config(image, command, hostname, user,
detach, stdin_open, tty, mem_limit, ports, environment, dns,
volumes, volumes_from, privileged)
@@ -435,6 +444,16 @@ class Client(requests.Session):
params={'term': term}), True)
def start(self, container, binds=None, lxc_conf=None):
+ '''
+
+ NOTES:
+ - Remember that you must declare "blank" volumes
+ at container creation to use binds
+ - An example of binds mapping from host to container::
+
+ {'/mnt/srv/': '/srv'}
+
+ '''
if isinstance(container, dict):
container = container.get('Id')
start_config = {