diff options
| author | Tomas Tomecek <ttomecek@redhat.com> | 2016-07-11 10:28:19 +0200 |
|---|---|---|
| committer | Tomas Tomecek <ttomecek@redhat.com> | 2016-10-05 09:33:32 +0200 |
| commit | 790d7525f0138184c7c4709b0ebd3e4ff73f4ce5 (patch) | |
| tree | 57ca5f41e8c290025d2baac46c9148aa63f29f52 | |
| parent | b65de73afea947cb65cc79c58acf414604ea6b16 (diff) | |
| download | docker-py-790d7525f0138184c7c4709b0ebd3e4ff73f4ce5.tar.gz | |
document how to recover from api version mismatch
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
| -rw-r--r-- | docs/api.md | 28 | ||||
| -rw-r--r-- | mkdocs.yml | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/docs/api.md b/docs/api.md index 579057a..738606d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -18,6 +18,34 @@ is hosted. * tls (bool or [TLSConfig](tls.md#TLSConfig)): Equivalent CLI options: `docker --tls ...` * user_agent (str): Set a custom user agent for requests to the server. + +## Version mismatch + +You may encounter an error like this: + +```text +client is newer than server (client API version: 1.24, server API version: 1.23) +``` + +To fix this, you have to either supply exact version to `Client` which you know that server supports: + +```python +client = docker.Client(version="1.23") +``` + +or let client pick the newest version server supports: + +```python +client = docker.Client(version="auto") +``` + +or even + +```python +client = docker.AutoVersionClient() +``` + + **** ## attach @@ -7,6 +7,7 @@ theme: readthedocs pages: - Home: index.md - Client API: api.md +- FAQ: faq.md - Port Bindings: port-bindings.md - Using Volumes: volumes.md - Using TLS: tls.md |
