mirror of https://github.com/docker/docker-py.git
document how to recover from api version mismatch
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
This commit is contained in:
parent
b65de73afe
commit
790d7525f0
28
docs/api.md
28
docs/api.md
|
|
@ -18,6 +18,34 @@ is hosted.
|
||||||
* tls (bool or [TLSConfig](tls.md#TLSConfig)): Equivalent CLI options: `docker --tls ...`
|
* 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.
|
* 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
|
## attach
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ theme: readthedocs
|
||||||
pages:
|
pages:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
- Client API: api.md
|
- Client API: api.md
|
||||||
|
- FAQ: faq.md
|
||||||
- Port Bindings: port-bindings.md
|
- Port Bindings: port-bindings.md
|
||||||
- Using Volumes: volumes.md
|
- Using Volumes: volumes.md
|
||||||
- Using TLS: tls.md
|
- Using TLS: tls.md
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue