diff options
| author | Joffrey F <joffrey@docker.com> | 2015-08-04 11:31:59 -0700 |
|---|---|---|
| committer | Joffrey F <joffrey@docker.com> | 2015-08-04 11:31:59 -0700 |
| commit | b0aa08c5b769b2326f1c2dc39b43ff7fcf539385 (patch) | |
| tree | a6bda1ef17beecbc51b0c55bbc44614b3d4235f1 /docs | |
| parent | 05ecc815786b8d2dee38bb35f2c6a401792f74d1 (diff) | |
| parent | 20a7e860b4b0ee37308f747b06c10380e584039f (diff) | |
| download | docker-py-b0aa08c5b769b2326f1c2dc39b43ff7fcf539385.tar.gz | |
Merge branch 'vpetersson-master'
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/api.md b/docs/api.md index bccd526..b9b29c5 100644 --- a/docs/api.md +++ b/docs/api.md @@ -234,6 +234,27 @@ from. Optionally a single string joining container id's with commas 'Warnings': None} ``` +### parse_env_file + +A utility for parsing an environment file. + +The expected format of the file is as follows: + +``` +USERNAME=jdoe +PASSWORD=secret +``` + +The utility can be used as follows: + +```python +>> import docker.utils +>> my_envs = docker.utils.parse_env_file('/path/to/file') +>> docker.utils.create_container_config('1.18', '_mongodb', 'foobar', environment=my_envs) +``` + +You can now use this with 'environment' for `create_container`. + ## diff Inspect changes on a container's filesystem |
