Open pirog opened 7 years ago
Hi, I'm most likely running in to the same problem with Dockerode 2.5.4 which relies on Docker-modem 1.0.4 . Anything with exec.start gets stuck and won't terminate properly.
docker desktop 4.12 has a compatibility shim that should fix this. https://docs.docker.com/desktop/release-notes/#bug-fixes-and-minor-changes see my comments about it here: https://github.com/apocas/dockerode/issues/534
Found an interesting situation that i was able to track down a bit. I am unsure if this is a bug with docker-modem or potentially how Docker for Windows sets up the named pipe to begin with.
Here is a file to reproduce (uses latest
node-docker-api
but upgraded todocker-modem 1.0.0
), the same thing happens if you use analogous code fordockerode
If you connect over
tcp
(need to allow insecure connections in the docker for windows app first), it works as expected but if you switch over to thenamed pipe
it will hang after "thing" is written tostdout
. What is extremely interesting is after this happens you can get the stream to close and the process to resume by pressing any key three times.Another interesting data point here is it looks like
docker-compose
itself avoids using the API for this on Windows, deciding to just delegate directly to a shell call todocker exec
. see: https://github.com/docker/compose/blob/master/compose/cli/main.py#L411My best guesses at this point are:
Any thoughts about why this could be happening?