docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.62k stars 1.97k forks source link

Allow installation of a specific version via generic driver #3374

Open schmunk42 opened 8 years ago

schmunk42 commented 8 years ago

With i.e. VirtualBox you can pick the box url and version to install a specific version of docker (AFAIK).

While the generic driver has a MACHINE_DOCKER_INSTALL_URL you can not select a version here. That would be super-helpful, eg. for keeping swarm nodes on the same engine versions.

thaJeztah commented 8 years ago

looks like a duplicate of https://github.com/docker/machine/issues/1702

schmunk42 commented 8 years ago

For my swarm DOCKER_API_VERSION from https://github.com/docker/docker/pull/15964 is partial workaround.

But yes, all drivers should be able to install a specific version IMO. Do most drivers install docker from get.docker.com? (so they are not on the AWS ami)

schmunk42 commented 8 years ago

Not directly related, but a reason why we need this: https://github.com/docker/docker/issues/21902

I'd rather kept my swarm on 1.9 for a while, than now running into errors because of engine and API version mismatches. Also upgrading is not very reliable, especially from 1.9 to 1.10.

schmunk42 commented 8 years ago

This is currently just a draft: https://github.com/docker/docker/compare/master...schmunk42:feature/install-specific-version

What do you think about setting a base version variable and a distro specific suffix, like docker_version, docker_version_suffix_wily?

Variables should only be set if they do not exist already, so this should be possible:

curl -sSL https://get.docker.com/ | docker_version=1.10.2 sh

The suffixes are not so nice, but resolving version constraints with apt-get i.e. also seem not so easy.

thaJeztah commented 8 years ago

I don't think this should be added to the hack/install.sh script; that script is really meant as a "quick install" for the latest version. In general, we're trying to move away from that script, because (e.g. on platforms where device mapper is used), it's really not suitable for production.

schmunk42 commented 8 years ago

it's really not suitable for production

But docker-machine is using it, isn't it in the scope of docker-machine to provision production-ready machines?

thaJeztah commented 8 years ago

some things cannot be automated (e.g. setting up devices for storage in case of devicemapper)

michelvocks commented 8 years ago

In my opinion, when you give docker-machine the official functionality to install docker engine on the created host then this feature should also be included. You said some things cannot be automated which is true, but not in this case.