dockerode: Cannot pull image on windows
This snippet:
return new Promise((resolve, reject) => {
docker.pull('any image', (error, stream) => {
docker.modem.followProgress(stream, (error, output) => {
if (error) {
reject(error);
return;
}
resolve(output);
}, (event) => console.log(event));
});
})
always rejects on windows with “context canceled” as error message. The Docker logs show something like this:
[16:57:26.956][ApiProxy ][Info ] proxy >> POST /v1.26/images/create?fromImage=postgres&tag=latest
[16:57:26.957][ApiProxy ][Info ] Dial Hyper-V socket 6f1ec07b-ba85-4cb4-ad22-d0e2577b8f24:23a432c2-537a-4291-bcb5-d62504644739
[16:57:26.958][ApiProxy ][Info ] Successfully dialed Hyper-V socket 6f1ec07b-ba85-4cb4-ad22-d0e2577b8f24:23a432c2-537a-4291-bcb5-d62504644739
[16:58:08.637][ApiProxy ][Info ] Cancel connection...
[16:58:08.641][ApiProxy ][Info ] proxy << POST /v1.26/images/create?fromImage=postgres&tag=latest
Normal docker pull imagename works inside powershell
Latest Docker for Windows.
It might be a problem with Docker for Windows itself, but any help would be really appreciated. Same snippet works correctly on mac and linux
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 11
- Comments: 20 (2 by maintainers)
Commits related to this issue
- 👌 IMPROVE: remove windows from test cases run due to https://github.com/apocas/dockerode/issues/347 — committed to george3447/docker-run by george3447 4 years ago
- 📦 NEW: add test cases (#5) * 📦 NEW: add unit test for config utils * 👌 IMPROVE: config-util test cases * 👌 IMPROVE: add seperate error types for empty array and empty file * 📦 NEW: add ... — committed to george3447/docker-run by george3447 4 years ago
This was plaguing our Windows builds so I dug a bit, the results can be found here as it’s an issue w/ docker-modem. Super interesting the Docker daemon seems to respond differently on win vs osx, but I assume that’s due to HyperV differences?
Either way, if you’re hurting for a solution you can just do pulls with plain ol’ node
http:Hope that helps!