Kaydet (Commit) 88ef5f36 authored tarafından Jan Losinski's avatar Jan Losinski Kaydeden (comit) Aanand Prasad

Add documentation for the Tmpfs Hostconfig option.

Signed-off-by: 's avatarJan Losinski <losinski@wh2.tu-dresden.de>
üst 72446b47
......@@ -111,6 +111,8 @@ for example:
container process will run as.
* devices (list): Host device bindings. See [host devices](host-devices.md)
for more information.
* tmpfs: Temporary filesystems to mouunt. See [Using tmpfs](tmpfs.md) for more
information.
**Returns** (dict) HostConfig dictionary
......
# Using Tmpfs
Tmpfs declaration is done with the `Client().create_container()`
method by declaring the mountpoints in the `host_config` section.
This is available from docker 1.10.
You can provide a list of declarations similar to the `--tmpfs`
option of the docker commandline client:
```python
container_id = cli.create_container(
'busybox', 'ls',
host_config=cli.create_host_config(tmpfs=[
'/mnt/vol2',
'/mnt/vol1:size=3G,uid=1000'
])
)
```
You can alternatively specify tmpfs as a dict the docker remote
API uses:
```python
container_id = cli.create_container(
'busybox', 'ls',
host_config=cli.create_host_config(tmpfs={
'/mnt/vol2': '',
'/mnt/vol1': 'size=3G,uid=1000'
})
)
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment