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

Bug: Error while fetching server API version #757

Open
Goldziher opened this issue Jan 9, 2025 · 4 comments
Open

Bug: Error while fetching server API version #757

Goldziher opened this issue Jan 9, 2025 · 4 comments

Comments

@Goldziher
Copy link

Goldziher commented Jan 9, 2025

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
@techanfa
Copy link

Same issue for
M3 chip,
Docker desktop 4.37.1
testcontainers 4.9.0 installed via poetry.
Same output from docker context ls

@alexanderankin
Copy link
Member

My guess is that this is happening with one of the components maintained by docker, either docker desktop or the python docker client, we don't really have docker desktop in the cicd, it's not so easy to install there. I'll try to take a look if it's that, see if upgrading the python docker client helps, in case it's not the latest or something. There have been instances of python requests library causing issues as well

@Goldziher
Copy link
Author

My guess is that this is happening with one of the components maintained by docker, either docker desktop or the python docker client, we don't really have docker desktop in the cicd, it's not so easy to install there. I'll try to take a look if it's that, see if upgrading the python docker client helps, in case it's not the latest or something. There have been instances of python requests library causing issues as well

Thank you. I reinstalled docker desktop, cleaned everything up, and restarted, and... It magically resolved.

I hate it when things are so obscure, but at least my tests are passing again.

I imagine it is something in docker desktop that is fucking things up.

Weirdly though, I was able to communicate with docker normally even when the test container library was not.

@jacobmiller22
Copy link

Same issue, had to reinstall docker desktop after macos Sequoia update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants