From 64f7807fbe76fab91cb8bab60ed56fa3b883ca14 Mon Sep 17 00:00:00 2001 From: Mathieu Le Marec - Pasquet Date: Mon, 30 Sep 2013 17:52:23 +0200 Subject: [PATCH] Documentation for binds --- docker/client.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docker/client.py b/docker/client.py index eb6df8b0..34c91a5b 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 = {