Skip to content

Bug: Error while fetching server API version #757

@Goldziher

Description

@Goldziher

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions