docker / engine-api

DEPRECATED: Please see https://github.com/docker/docker/tree/master/client
Apache License 2.0
264 stars 163 forks source link

Use dialer from client to set up hijacked connection #361

Closed challengee closed 8 years ago

challengee commented 8 years ago

After some digging with @devwout, we discovered that postHijacked just uses net.Dial instead of the one from the underlaying transport. We're having problems with this because we tunnel the docker socket over SSH.

The tlsDialWithDialer now used a Dialer interface instead of net.Dialer, which means we don't get all of the timeout options. However these were not used (new(net.Dialer)), so I dumped them.

There was no test for TestContainerExecAttach, I also didn't add one.

This probably needs some additional work though.

Thanks!

vdemeester commented 8 years ago

/cc @LK4D4 @stevvooe

crosbymichael commented 8 years ago

Thanks for this PR.

We have moved the code from this repo back into the main docker/docker repository; if you still wish to make this change you will need to reopen this PR on the main repo.

You can find the code for the client and types here:

https://github.com/docker/docker/tree/master/api/types https://github.com/docker/docker/tree/master/client

Sorry for the inconvenience but making this change helps people better contribute and not have the vendor mess going forward when changing the types or client for Docker.

Sorry about that and feel free to ask if you have any questions.