mirror of https://github.com/docker/docker-py.git
Merge pull request #520 from kenden/master
Making examples in doc a bit clearer for volumes and ports_binding
This commit is contained in:
commit
dc16b56c4b
|
@ -3,7 +3,7 @@ Port bindings is done in two parts. Firstly, by providing a list of ports to
|
|||
open inside the container in the `Client().create_container()` method.
|
||||
|
||||
```python
|
||||
c.create_container('busybox', 'ls', ports=[1111, 2222])
|
||||
container_id = c.create_container('busybox', 'ls', ports=[1111, 2222])
|
||||
```
|
||||
|
||||
Bindings are then declared in the `Client.start` method.
|
||||
|
|
|
@ -4,7 +4,7 @@ Volume declaration is done in two parts. First, you have to provide
|
|||
a list of mountpoints to the `Client().create_container()` method.
|
||||
|
||||
```python
|
||||
c.create_container('busybox', 'ls', volumes=['/mnt/vol1', '/mnt/vol2'])
|
||||
container_id = c.create_container('busybox', 'ls', volumes=['/mnt/vol1', '/mnt/vol2'])
|
||||
```
|
||||
|
||||
Volume mappings are then declared inside the `Client.start` method like this:
|
||||
|
|
Loading…
Reference in New Issue