testcontainers / testcontainers/testcontainers-python

Bug: Error while fetching server API version

Open
#757 11 comments 2 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

Describe the bug

The library is raising a DockerException when trying to fetch the server version. I saw multiple older issues related to this issue, but it's now repeating.

To Reproduce

def create_container():
    container = PostgresContainer("pgvector/pgvector:pg17", driver=None)
    container.start()

Runtime environment

  • M1 Pro
  • Python 3.12.8
  • Docker Desktop 4.37.2 (179585)
  • Testcontainers 4.9.0 installed via uv

Results of running docker context ls:

NAME              DESCRIPTION                               DOCKER ENDPOINT                                          ERROR
default           Current DOCKER_HOST based configuration   unix:///var/run/docker.sock
desktop-linux *   Docker Desktop                            unix:///Users/naamanhirschfeld/.docker/run/docker.sock

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

No source file or test is identified in the report. Start by reproducing the failure with PostgresContainer("pgvector/pgvector:pg17", driver=None) on the documented Docker context, then trace the server API version fetch that raises DockerException. Done means container startup succeeds in this environment without that error, with the behavior covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.