Windows : strange behaviour
Running the latest 0.0.2 in Windows results in this beahviour :
C:\Utilisateurs\a503140\Downloads>machine_windows_amd64.exe create -d virtualbox dev
←[31mFATA←[0m[0000] Identity auth public key does not exist at C:\Utilisateurs\a503140\.docker\public-key.json. Please run the docker client without any options to create it.
What seems strange is that code seems to be run inside the machine, and not outside (utils.go) :
cmdString := fmt.Sprintf("mkdir -p %q && cat > %q", authorizedKeysPath, filepath.Join(authorizedKeysPath, "docker-host.json"))
cmd, err := d.GetSSHCommand(cmdString)
Well OK, seems related to this : https://github.com/docker/docker/pull/8265 (the docker identity client).
Tried to build the windows client, but ended in errors when running, i'll copy that to the docker PR.
I'm goping to play inside linux VM, and copy the .docker folder with the keys inside in order to conforme to machine needs.
I built a windows build of https://github.com/docker/docker/pull/8265. It was complaining that it couldn't write .docker/key.json, but it still did. It didn't create public-key.json, so I created it manually from key.json
After that, machine was working well for me on windows.
I found the same problem. The path code on Windows is messed up (it sticks "public-" before the "C:" instead of before the "key.json"), and I'm trying to fix it. But if you rename .docker/key.json to .docker/public-key.json it works.
I figured this out btw...the code is using path.Split, path.Join etc. instead of filepath.Split, filepath.Join. path assumes '/' separators, but Windows of course uses ''. Talk about the gift that keeps on giving...I've been fixing bugs like this in portable code since 1983.
On my side, same as you, i ran into the same problem with the docker bin compiled. So i just booted up a b2d VM, ssh into, and using the docker binary provided by @bfirsh in the README, calling it one time, and copying the resulting ~/.docker folder in mu %HOME% in Windows. After that, machine stopped to complain about the key, so i could manage to work :)
Thank you !
Sent dmcgowan a PR: https://github.com/dmcgowan/docker/pull/3
btw key.json and public-key.json should be different files. The code creates both.
Hop, PR for that inside machine : https://github.com/docker/machine/pull/83
https://github.com/docker/machine/pull/83 and https://github.com/docker/machine/pull/93 closed or merged, i can close the current issue.
Thanks for all !