docker-machine-driver-xhyve icon indicating copy to clipboard operation
docker-machine-driver-xhyve copied to clipboard

Boot2Docker ISO file always downloaded

Open g7eg10r opened this issue 8 years ago • 0 comments

Symptom

Whenever a new machine is created, the Boot2Docker ISO is downloaded, even the newest one has been cached (cf. https://github.com/docker/machine/issues/4058).

Root cause

Only the 3 digits of the version number are considered when extracted from the ISO: https://github.com/zchee/docker-machine-driver-xhyve/blob/a2060c0729fc92f98265d85bdaed6dd88562bf15/b2d/b2d.go#L219 while the actual (and encoded) version number may be suffixed (e.g. with "-ce" in v17.07.0-ce ISO file version). Thus for the v17.07.0-ce ISO file, the version is parsed as 17.07.0 while the advertised one (in https://api.github.com/repos/boot2docker/boot2docker/releases/latest) is 17.07.0-ce, hence a mismatch and hence a download.

It is weird that the docker-machine source code implementation for that extraction, which differs, is broken as well.

g7eg10r avatar Sep 01 '17 21:09 g7eg10r