mirror of https://github.com/docker/docker-py.git
Merge branch 'api-docs-update'
This commit is contained in:
commit
531fdc77e8
50
docs/api.md
50
docs/api.md
|
@ -19,33 +19,6 @@ is hosted.
|
|||
* 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
|
||||
|
@ -1231,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")
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue