Docker Version Manager
Version management for your Docker clients. Heavily influenced by nvm (ok, "borrowed" from). This tool modifies your current PATH to switch between different Docker clients.
Escape from this error for a little bit longer:
Error response from daemon: client and server don't have same version (client : 1.18, server: 1.16)
Prerequisites
Mac OS X and Linux require curl or wget.
Installation
- Run the one of the installation scripts below.
- Copy, paste and run the commands from the installation output to finalize the installation.
Mac OS X and Linux
$ curl -sL https://download.getcarina.com/dvm/latest/install.sh | sh
Windows
Open a PowerShell command prompt and execute the following command. We use PowerShell 4 to do the initial
installation but you can use dvm
with PowerShell or CMD once it's installed.
> iex (invoke-webrequest https://download.getcarina.com/dvm/latest/install.ps1)
Upgrading from previous dvm
If you have dvm 0.2 or later, run dvm upgrade
to install the latest version of dvm.
If you have dvm 0.0.0, then you will need to reinstall. dvm
used to only be only one shell script, relying on a git backed ~/.dvm
. This worked well for *nix users and was not workable for Windows users. We've since switched over to small wrapper scripts and a go binary called dvm-helper
to make cross platform simple and easy. To upgrade, you can either pull and rebuild yourself (with a working go setup), or use the install script. You'll need to open up a new terminal to ensure that all the dvm
functions are set properly.
Usage
To install the 1.8.2 release of docker, do this:
dvm install 1.8.2
Now in any new shell use the installed version:
dvm use 1.8.2
If you want to see what versions are installed:
dvm ls
If you want to see what versions are available to install:
dvm ls-remote
To restore your PATH, you can deactivate it:
dvm deactivate
Bash and zsh completion
There is bash and zsh completion available in $DVM_DIR/bash_completion
. To invoke it into your shell, run
[[ -r $DVM_DIR/bash_completion ]] && . $DVM_DIR/bash_completion
For zsh, there's a bit of special sauce using bashcompinit
from the more recent versions of zsh.
Usage
$ dvm [TAB]
alias install ls uninstall which
current list ls-alias unload
deactivate list-alias ls-remote use
help list-remote unalias version
$ dvm u[TAB]
unalias uninstall unload use
$ dvm us[TAB]
$ dvm use [TAB]
1.8.2 1.9.0 carina default experimental