testcontainers-python: testcontainers wait indefinitely without effects when running in Gitlab-CI

I’m running a test based on testcontainers-python in a container running in Gitlab CI.

Basically the CI spawns a docker-in-docker container next to the container running the tests. I then set the environment variable DOCKER_HOST so that it can be used by testcontainers.

But in practice the test just get stuck, so I ran it with pytest -s to see the logs of testcontainers and got:

tests/test.py
Pulling image postgres:10
Container started:  4a1115dc98
Waiting to be ready...

And then it gets stuck indefinitely (I waited 20 minutes).

For the record, testcontainers-java works perfectly with this same situation, so it should be possible to make this work.

I’m not sure how I can get more debug information to understand what is happening, but shouldn’t it timeout normally at least?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 30 (8 by maintainers)

Most upvoted comments

Fixed in #85. Feel free to reopen if problems persist.