Giter Site home page Giter Site logo

dvm's Introduction

Docker Version Manager

Build Status

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.

dvm-usage

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: curl/wget or homebrew.
  • Windows: PowerShell v4+

Installation

  1. Run the one of the installation scripts below.
  2. Copy, paste and run the commands from the installation output to finalize the installation.

Mac OS X with Homebrew

$ brew update && brew install dvm

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.

> Invoke-WebRequest https://download.getcarina.com/dvm/latest/install.ps1 -UseBasicParsing | Invoke-Expression

Upgrading from previous dvm

Mac OS X with Homebrew

Homebrew users should use brew upgrade dvm to get the latest version, as dvm upgrade is disabled in homebrew builds.

Mac OS X, Linux and Windows If you have dvm 0.2 or later, run dvm upgrade to install the latest version of dvm.

Note: 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

Mirroring docker builds

You may want to use a local mirror for Docker binaries instead of downloading them from the default site (https://get.docker.com/builds). There are a few possible reasons for this, most commonly the need to avoid dealing with corporate proxies every time.

The environment variable DVM_MIRROR_URL can be set to a local mirror inside your LAN:

export DVM_MIRROR_URL="http://localserver/docker/builds"
dvm install 1.10.3

dvm's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.