Do not detect as a remote run if DOCKER_HOST is set to a unix:// socket#99
Do not detect as a remote run if DOCKER_HOST is set to a unix:// socket#99jacob733 wants to merge 1 commit intoJonathonReinhart:mainfrom
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
|
This looks good to me. For my own curiosity, would you mind elaborating on the use cases which set |
|
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. |
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.