Open binocarlos opened 9 years ago
We've dug into this and the really weird thing is that docker run ubuntu echo hello
works (which, I think, relies on the TCP half-close trick here) when powerstrip is run outside a container. When powerstrip is run inside a container, and port 2375 exposed via -p "2375:2375"
, docker run ubuntu echo hello
does not work.
Current hypothesis is that something to do with the Docker iptables NAT rules is interfering with the TCP half-close.
FTR, this is the difference between powerstrip running outside a container (LHS) vs powerstrip running inside a container. This behaviour is the same both with the golang and Twisted versions.
Proposed workaround presently is to make Docker bind to a UNIX socket rather than a port, bypassing the (currently unproven) Docker NAT half-close issues.
Demonstrated working in https://github.com/ClusterHQ/powerstrip/compare/unix-socket
When I do this using
DOCKER_HOST=tcp://127.0.0.1:2375
(i.e. pointing @ powerstrip):docker run --rm -ti ubuntu echo hello
- it outputshello
But when I do this:
docker run --rm ubuntu echo hello
- it outputs nothingWhereas when I do the same thing without pointing at powerstrip - it outputs
hello
for both scenarios.There must be a flag in powerstrip that depends on either
-t
or-i
that enables streaming mode - we need to do this for any attach mode - hope this makes sense.