Skip to content

Comments

Do not detect as a remote run if DOCKER_HOST is set to a unix:// socket#99

Open
jacob733 wants to merge 1 commit intoJonathonReinhart:mainfrom
jacob733:fix_is_remote
Open

Do not detect as a remote run if DOCKER_HOST is set to a unix:// socket#99
jacob733 wants to merge 1 commit intoJonathonReinhart:mainfrom
jacob733:fix_is_remote

Conversation

@jacob733
Copy link

@jacob733 jacob733 commented Oct 9, 2017

Certain use cases set DOCKER_HOST even if it points to a local docker instance. So a simple check if the variable is set is insufficient in some cases. Adding a check for if the variable is set to something using the unix:// protocol will make this filter more exact.

@codecov-io
Copy link

codecov-io commented Oct 9, 2017

Codecov Report

Merging #99 into master will decrease coverage by 0.39%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #99     +/-   ##
=========================================
- Coverage   97.08%   96.68%   -0.4%     
=========================================
  Files           9        9             
  Lines         480      483      +3     
=========================================
+ Hits          466      467      +1     
- Misses         14       16      +2
Impacted Files Coverage Δ
scuba/__main__.py 96.46% <50%> (-0.85%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a88c699...ddbe140. Read the comment docs.

@JonathonReinhart
Copy link
Owner

This looks good to me. For my own curiosity, would you mind elaborating on the use cases which set DOCKER_HOST even on a local Docker instance?

@jacob733
Copy link
Author

jacob733 commented Oct 9, 2017

For my case, it is for use with Jenkins, where an explicit DOCKER_HOST setting provides for a more readable configuration.

Note that if DOCKER_HOST is set to something like tcp://127.0.0.1... then this will still not be detected as a local docker. This is because such a setting might just as well be pointing to a local SSH port forward, which is one way to safely connect to a remote docker daemon.

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.

3 participants