-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Docker Client Version Negotiation #21930
Comments
Part of the issue is also that the data structures can also change and potentially cause encode/decode issues. |
+1, but supporting all the protocol versions is a difficult work. How about just supporting a single specific version? |
Just a spontanous idea. If managing the different API version in the code is difficult. What about delegating the command to the right version of the docker client? Eg. if the user has older versions of the Docker client installed beside the Docker Engine API 1.22 docker (1.11, API 1.24) The But, ok there is |
@StefanScherer that is strinctly better than |
It's a little bit related to #27745 I think 👼 |
Yes, this was implemented, and available in docker 1.13 and up |
I am getting error as below... ''' docker versionClient: Server: pythonPython 2.7.5 (default, Aug 29 2016, 10:12:21)
''' |
@Bharathkumarraju that looks to be an issue with the python client you're using, which may not have version-negotiation, or needs to be configured to use a specific API version. Can you report that in the docker-py issue tracker? That's where the Python SDK is maintained; https://github.com/docker/docker-py (make sure to check the docs and search existing issues before opening a new issue there) |
Great thanks as of now I am using like this is that okay right? client = docker.DockerClient(version='1.24') for i in client.containers.list(): Works for me |
This doesn't work today. Even though I set
The output from
|
@remram44 see #35008 but the |
There are many times when the Docker version on a client can differ to that on a server.
This is typically because that end users are faster to update their clients whereas hosted Docker services or servers in production are slower to upgrade.
This issue can be much worse when attempting to RC test the new version of Docker as you need to switch Docker Client versions or set
DOCKER_API_VERSION
. The latter can have consequences e.g newer client features and flags failing against older engine versions.Today
Attempting to connect to older server:
Attempting to create an IPv6 network
The command succeeds, but IPv6 wasn't enabled as this is only available in a newer API version!
Tomorrow
Regardless of version, commands should work:
Handling of unsupported operations
Suggestion
If the Docker Client were able to maintain some form of session state, it could detect and preserve the Docker API version for a session. It should also be possible to prevent newer client features from being used on servers that do not support them to avoid inconsistencies like the example noted above
The text was updated successfully, but these errors were encountered: