8000 Only pass $DOCKER_HOST if it is a Unix socket by bboreham · Pull Request #1822 · weaveworks/weave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Only pass $DOCKER_HOST if it is a Unix socket #1822

Merged
merged 2 commits into from
Dec 22, 2015
Merged

Only pass $DOCKER_HOST if it is a Unix socket #1822

merged 2 commits into from
Dec 22, 2015

Conversation

bboreham
Copy link
Contributor

Fixes #1820, at the cost of some flexibility: if $DOCKER_HOST is set to tcp:xxx, then the remote Docker must also be listening on the standard /var/run/docker.sock.

Previously it would work if $DOCKER_HOST pointed at a non-TLS TCP socket. But those are discouraged.

@bboreham bboreham added this to the 1.4.1 milestone Dec 22, 2015
@errordeveloper
Copy link
Contributor

Works with Docker Machine on OS X.

@rade
Copy link
Member
rade commented Dec 22, 2015

Previously it would work if $DOCKER_HOST pointed at a non-TLS TCP socket.

...and the address was the correct one when on the remote machine, right?

}

exec_remote() {
# Pass through DOCKER_HOST if it is a Unix socket;
# a TCP socket may be secured by TLS, in which case we can't use it
if echo "$DOCKER_HOST" | grep -q "^unix://" ; then

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@bboreham
Copy link
Contributor Author

...and the address was the correct one when on the remote machine, right?

Indeed.

@bboreham
Copy link
Contributor Author

Updated per review comments

@rade
Copy link
Member
rade commented Dec 22, 2015

Needs removal of a few more -e DOCKER_HOST.

a TCP socket may be secured by TLS, in which case we can't use it.
 - since we won't now be copying $DOCKER_HOST

This reverts commit d8cfbc4.
@bboreham
Copy link
Contributor Author

Oops, fixed

bboreham added a commit that referenced this pull request Dec 22, 2015
Only pass $DOCKER_HOST if it is a Unix socket - fixes #1820
@bboreham bboreham merged commit f434fad into 1.4 Dec 22, 2015
@rade rade deleted the 1820-unix-only branch March 19, 2016 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
< 3BFA /option>
Development

Successfully merging this pull request may close these issues.

3 participants
0