Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Hyper's http protocol enforcement. #129

Merged
merged 1 commit into from Nov 14, 2018
Merged

Disable Hyper's http protocol enforcement. #129

merged 1 commit into from Nov 14, 2018

Conversation

davidtwco
Copy link
Contributor

Thanks for the awesome crate! I was having some issues using with Docker for Windows (in combination with the Windows Subsystem for Linux) and this PR fixes that. Happy to make any adjustments that are required.

What did you implement:

This PR manually builds a HttpConnector from Hyper so that it does not fail if the protocol is not http. Therefore, DOCKER_HOST of the form tcp://127.0.0.1:2375 will work with shiplift.

Closes: N/A

How did you verify your change:

Tested with the project I'm working on where this was failing previously.

What (if anything) would need to be called out in the CHANGELOG for the next release:

N/A

There are some situations where the Docker daemon will expose a HTTP
server and will expect connections through a TCP connection rather than
via a unix socket. For example, this is the case with Docker for Windows
when used through the Windows Subsystem for Linux.

In these cases, `DOCKER_HOST` will be of the form
`tcp://127.0.0.1:2375`. Docker will not work if `DOCKER_HOST` has the
`http` protocol. This commit manually builds a `HttpConnector` from
Hyper so that it does not fail if the protocol is not `http`. Therefore,
the `DOCKER_HOST` that works with Docker will also work with shiplift.
@softprops softprops merged commit 29bd95b into softprops:master Nov 14, 2018
@davidtwco davidtwco deleted the enforce-http branch November 14, 2018 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants