Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

always re-fetch boot2docker, it said 'Default Boot2Docker ISO is out-of-date' #4058

Closed
ronnin opened this issue Apr 13, 2017 · 11 comments
Closed

Comments

@ronnin
Copy link

ronnin commented Apr 13, 2017

every time, I create new docker machine, it always takes the existed boot2docker.iso out-of-date, then do re-fetching.

in fact, the boot2docker is up-to-date:
location: $HOME/.docker/machine/cache/boot2docker.iso
version: v17.04.0-ce
size: 38M
sha1: 6ec63a8a659d979fee56bb16b2a31c324baae1aa

$ docker-machine create -d xhyve dev-b
Running pre-create checks...
Creating machine...
(dev-b) Default Boot2Docker ISO is out-of-date, downloading the latest release...
(dev-b) Latest release for github.com/boot2docker/boot2docker is v17.04.0-ce
(dev-b) Downloading /Users/ronnin/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v17.04.0-ce/boot2docker.iso...

$ docker-machine version dev-a
17.04.0-ce

$ docker-machine version
docker-machine version 0.10.0, build 76ed2a6

$ uname -a
Darwin ronmac.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

$ brew info docker-machine-driver-xhyve
docker-machine-driver-xhyve: stable 0.3.1 (bottled), HEAD
Docker Machine driver for xhyve
https://github.com/zchee/docker-machine-driver-xhyve

@ronnin
Copy link
Author

ronnin commented Apr 13, 2017

because we have trouble with downloading from github-cloud.s3.amazonaws.com, it bothers

@NoComments
Copy link

so, how to fix it?

@oceanho
Copy link

oceanho commented May 9, 2017

docker-machine will check boot2docker version from
https://api.github.com/repos/boot2docker/boot2docker/releases/latest
when run docker-machine create.

Local boot2docker.iso(C:\Users\Administrator\.docker\machine\cache) will be used if the network is unreachable
so. i'm disconnect network and then execute docker-machine create.

@Steven0668
Copy link

@oceanho Thx, It works for me.

@ggrussenmeyer
Copy link
Contributor

This behaviour is observed because the version encoded within the ISO is not as expected by the code that extracts it, hence letting docker-machine believe that there is a version mismatch between the cached ISO and the latest available one.

As a matter of fact, there are two variations of this anomaly:

  1. one in docker-machine-xhyve-driver (cf. Boot2Docker ISO file always downloaded machine-drivers/docker-machine-driver-xhyve#197);
  2. and one in docker-machine,
    where the starting index of the version number is determined using the whole version data
    versionIndex := strings.Index(fullVersion, versionPrefix)

    but used after having trimmed the whole version data
    vers := strings.TrimSpace(fullVersion)[versionIndex+1:]

    which may lead to an inconsistent result if the whole version data starts with spaces (which is the case for v17.07.0-ce ISO).

ggrussenmeyer pushed a commit to solent/machine that referenced this issue Sep 2, 2017
shin- pushed a commit that referenced this issue Oct 11, 2017
@gaurav5430
Copy link

gaurav5430 commented Nov 29, 2018

is this resolved in docker toolbox as well ? I am still facing the same issue on Windows 8.1 with docker toolbox

@surabhiu
Copy link

I am still facing the same issue on Mac.

@paterit
Copy link

paterit commented Dec 4, 2018

Similar case here on Ubuntu 16.04. With commands:

docker-machine create dm-cicd \
    --driver virtualbox \
    --virtualbox-memory 6144 \
    --virtualbox-cpu-count 2 \
    --virtualbox-disk-size 20000
docker-machine start dm-cicd

I got the following logs:

Running pre-create checks...
(dm-cicd) Unable to get the local Boot2Docker ISO version:  Did not find prefix "-v" in version string
(dm-cicd) Default Boot2Docker ISO is out-of-date, downloading the latest release...
(dm-cicd) Latest release for github.com/boot2docker/boot2docker is v18.09.0
(dm-cicd) Downloading /home/user/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v18.09.0/boot2docker.iso...
(dm-cicd) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(dm-cicd) Unable to get the local Boot2Docker ISO version:  Did not find prefix "-v" in version string
(dm-cicd) Default Boot2Docker ISO is out-of-date, downloading the latest release...
(dm-cicd) Latest release for github.com/boot2docker/boot2docker is v18.09.0
(dm-cicd) Downloading /home/user/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v18.09.0/boot2docker.iso...
(dm-cicd) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
(dm-cicd) Copying /home/user/.docker/machine/cache/boot2docker.iso to /home/user/.docker/machine/machines/dm-cicd/boot2docker.iso...

And if I run it again it download it again. Twice.

@oddballbutler
Copy link

I'm getting the same as @paterit on Ubuntu 18.04

docker-machine version 0.16.0, build 702c267

@csegarragonz
Copy link

There is a workaround that I have used to get everything to work. Basically you download the latest iso from here, you save it in a directory, say ~/tmp/boot2docker.iso. And then you create the machine doing

docker-machine create \
    -d virtualbox \
    --virtualbox-boot2docker-url ~/tmp/boot2docker.iso \
   < other parameters >

It is not a solution but it gets the work done. Of course it is up to you to keep track of the latest .iso version.

@gaoxinge
Copy link

platform

  • win10
  • docker-machine.exe version 0.16.0, build 702c267

command

docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" --hyperv-boot2docker-url file://C:/Users/xg.gao/boot2docker.iso manager

caution

don't use

  • --hyperv-boot2docker-url ~/boot2docker.iso
  • --hyperv-boot2docker-url file://~/boot2docker.iso

reference

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests