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

fix DinD host detection when using local socket #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 5, 2023

  1. fix DinD host detection when using local socket

    When using IPC socket (unix/npipe) to communicate with local docker
    server docker-py implementation rewrites the base url to HTTP, see
    https://github.com/docker/docker-py/blob/e901eac7a8c5f29c7720eafb9f58c8356cca2324/docker/api/client.py#L143-L168
    
    We cannot rely on URL scheme in order to detect such connections.
    Instead, we detect connection adapters added by docker-py api client:
    
    - UnixHTTPAdapter
      https://github.com/docker/docker-py/blob/e901eac7a8c5f29c7720eafb9f58c8356cca2324/docker/transport/unixconn.py
    
    - NpipeHTTPAdapter
      https://github.com/docker/docker-py/blob/e901eac7a8c5f29c7720eafb9f58c8356cca2324/docker/transport/npipeconn.py
    
    As NpipeHTTPAdapter type may not be available outside of Windows we rely on
    adapter-specific attributes.
    ikravets committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f9d4508 View commit details
    Browse the repository at this point in the history