Closed andrefernandes closed 8 years ago
Thank you for adding documentation on setting up and using a mirror!
This is cool for even those who aren't using mirroring! I picked what I thought was a bad version number 1.6.2
and it worked, because though it wasn't an official release in GH, the docker client URL did exist for that version.
$ dvm --debug install --nocheck=false 1.6.2
dvm install 1.6.2
Version 1.6.2 not found - try `dvm ls-remote` to browse available versions.
$ dvm --debug install --nocheck=true 1.6.2
dvm install 1.6.2
Skipping version validation!
Installing 1.6.2...
Downloading https://get.docker.com/builds/Darwin/x86_64/docker-1.6.2
Downloading https://get.docker.com/builds/Darwin/x86_64/docker-1.6.2.sha256
Downloaded Docker 1.6.2 to /Users/caro8994/src/github.com/getcarina/dvm/bin/docker/1.6.2/docker.
# output truncated
Now using Docker 1.6.2
For a true bad version, the output with --nocheck
still makes sense I think.
$ dvm install --nocheck 1.6.3
Installing 1.6.3...
Unable to download https://get.docker.com/builds/Darwin/x86_64/docker-1.6.3. (Status 403)
I'll get this merged and released today.
Alrighty, this PR has been manually merged and dvm 0.6.0 released with support for --nocheck
, you can get the latest version by running dvm upgrade
.
Thank you for this nifty flag!
Glad I could help :)
:heart:
Optionally ("nocheck") avoid checking if docker version exists (dvm install). Usually we go for DVM_MIRROR_URL not just for speed, but also to avoid using a cursed proxy by all means.
Current code always calls getAvailableVersions one way or another.
This PR is just an untested suggestion.