Merge branch 'TomasTomecek-improve-version-mismatcj'

This commit is contained in:
Joffrey F 2016-10-05 11:15:29 -07:00
commit b22e390e56
1 changed files with 24 additions and 0 deletions

View File

@ -18,6 +18,7 @@ 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.
****
## attach
@ -1203,3 +1204,26 @@ TODO:
* load_image
-->
****
## 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 the exact version your server supports
when instantiating the `Client`:
```python
client = docker.Client(version="1.23")
```
or let the client automatically detect the newest version server supports:
```python
client = docker.Client(version="auto")
```