summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2014-11-14 01:35:49 +0100
committerJoffrey F <joffrey@docker.com>2014-11-14 01:35:49 +0100
commit8df3a3f5aee0c11d6c764def2e5b8c2ee943a916 (patch)
treef8f707ed91fbff4b88b74249d42f186e825bab38
parent773cd0cd57753f5f0dda42ff2b8949124d8bbd45 (diff)
downloaddocker-py-8df3a3f5aee0c11d6c764def2e5b8c2ee943a916.tar.gz
Moved boot2docker instructions to their own file
-rw-r--r--docs/api.md23
-rw-r--r--docs/boot2docker.md23
-rw-r--r--mkdocs.yml1
3 files changed, 24 insertions, 23 deletions
diff --git a/docs/api.md b/docs/api.md
index a9edb33..3dd9afb 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -8,29 +8,6 @@ from docker import Client
c = Client(base_url='unix://var/run/docker.sock')
```
-**Boot2docker**:
-
-For usage with boot2docker, there is a helper function in docker.utils named `kwargs_from_env`, it will pass any environment variables from Boot2docker to the Client.
-
-First run boot2docker in your shell:
-```bash
-$ $(boot2docker shellinit)
-Writing /Users/you/.boot2docker/certs/boot2docker-vm/ca.pem
-Writing /Users/you/.boot2docker/certs/boot2docker-vm/cert.pem
-Writing /Users/you/.boot2docker/certs/boot2docker-vm/key.pem
-export DOCKER_HOST=tcp://192.168.59.103:2376
-export DOCKER_CERT_PATH=/Users/you/.boot2docker/certs/boot2docker-vm
-export DOCKER_TLS_VERIFY=1
-```
-
-and then, in your python script:
-```python
-from docker.client import Client
-from docker.utils import kwargs_from_env
-client = Client(**kwargs_from_env())
-print client.version()
-```
-
**Params**:
* base_url (str): Refers to the protocol+hostname+port where the Docker server
diff --git a/docs/boot2docker.md b/docs/boot2docker.md
new file mode 100644
index 0000000..0888611
--- /dev/null
+++ b/docs/boot2docker.md
@@ -0,0 +1,23 @@
+# Using with Boot2docker
+
+For usage with boot2docker, there is a helper function in the utils package named `kwargs_from_env`, it will pass any environment variables from Boot2docker to the Client.
+
+First run boot2docker in your shell:
+```bash
+$ $(boot2docker shellinit)
+Writing /Users/you/.boot2docker/certs/boot2docker-vm/ca.pem
+Writing /Users/you/.boot2docker/certs/boot2docker-vm/cert.pem
+Writing /Users/you/.boot2docker/certs/boot2docker-vm/key.pem
+export DOCKER_HOST=tcp://192.168.59.103:2376
+export DOCKER_CERT_PATH=/Users/you/.boot2docker/certs/boot2docker-vm
+export DOCKER_TLS_VERIFY=1
+```
+
+You can then instantiate `docker.Client` like this:
+```python
+from docker.client import Client
+from docker.utils import kwargs_from_env
+
+client = Client(**kwargs_from_env())
+print client.version()
+```
diff --git a/mkdocs.yml b/mkdocs.yml
index 46b1773..3f2eda3 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -11,5 +11,6 @@ pages:
- [volumes.md, Using Volumes]
- [tls.md, Using TLS]
- [host-devices.md, Host devices]
+- [boot2docker.md, Using with boot2docker]
- [change_log.md, Change Log]
- [contributing.md, Contributing]