Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Docker version drift #1839

Closed
rgbkrk opened this issue Sep 11, 2015 · 5 comments
Closed

Docker version drift #1839

rgbkrk opened this issue Sep 11, 2015 · 5 comments

Comments

@rgbkrk
Copy link

rgbkrk commented Sep 11, 2015

How do users deal with version drift across our running machines?

Let's say I deploy to a provider when I'm on Docker 1.6.1 then later deploy a server with version 1.7.0 Meanwhile, I've updated my local Docker client to 1.8.1. Along the way, we'll see

Error response from daemon: client and server don't have same version (client : 1.13, server: 1.12)

This only affects usage from the Docker CLI and won't affect e.g. docker-py, where you can specify the API version.

I'm half tempted to write a Docker Version Manager.

Related to #1702.

@ehazlett
Copy link
Contributor

You can use the docker-machine upgrade <name> command. That will update to the latest stable (or experimental version if you've specified that).

@rgbkrk
Copy link
Author

rgbkrk commented Sep 11, 2015

If you do that, you'll have to migrate your containers too right?

@thaJeztah
Copy link
Member

FYI, there's currently a PR in docker to allow overriding the API version that the client uses; moby/moby#15964. It is considered a "power user" feature, because using a different API version could lead to unexpected behavior.

If I understand correctly, your use case would be to be able to "pin" machine to install a specific version of docker, I.e. install docker 1.7.x, even if docker 1.8 is available?

@rgbkrk
Copy link
Author

rgbkrk commented Sep 13, 2015

My use case is a machine that was launched with an old version (that has running containers/services) yet I want to be able to do operations (possibly for the sake of migration to a newer version).

If specifying the API would be unstable, how would you feel about me writing a docker version manager, a la nvm, rvm, etc.? That would satisfy my needs.

@thaJeztah
Copy link
Member

My use case is a machine that was launched with an old version (that has running containers/services) yet I want to be able to do operations (possibly for the sake of migration to a newer version).

I think moby/moby#15964 would be suitable for that situation, as long as you're not trying to go "too many versions" back. The reason for "warning" against it, is that, although the api is versioned, newer clients may not be fully backwards compatible with the older API.

If you (temporarily) need an older version of the docker client to work with an older daemon, you can still download all older binaries, using the instructions found at this page; https://docs.docker.com/installation/binaries/#get-the-docker-binary

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants