testcontainers / testcontainers/testcontainers-python

Investigate what to do about "localnpipe" on windows

Open
#415 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
386
Avg merge
4h 40m
Merged PRs (30d)
1

Description

it has been some time. the urllib3/docker-py incompatibilities are fixed. the time of using named pipes on windows is here. the question is how to deal with them in this library. for now, i am suggesting a fix like:

class DockerContainer:
    # ...
    def get_container_host_ip(self) -> str:
        # ...
        # see https://github.com/testcontainers/testcontainers-python/issues/415
        if host == "localnpipe" and "Windows" == system():
            return "localhost"
        # ...

but it really should get investigated in the short term.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at DockerContainer.get_container_host_ip and review how the library currently handles host values on Windows, alongside the urllib3/docker-py compatibility context. Reproduce the localnpipe case on Windows; the investigation is done when the supported behavior and required change are clearly documented and validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devtools, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.