question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

testcontainers wait indefinitely without effects when running in Gitlab-CI

See original GitHub issue

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?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tillahoffmanncommented, Apr 28, 2020

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

0reactions
tuvshuudcommented, Feb 10, 2022

@willgme happy to hear that it resolves your issue. To be merged, we need to refactor some codes to pass the all test cases and test on windows and other DinD environments. I just don’t have time these days

Read more comments on GitHub >

github_iconTop Results From Across the Web

Waiting for containers to start or be ready - Testcontainers
Sometimes we need to wait until the container reaches a running state and then exits - this is the 'one shot startup' strategy,...
Read more >
Gitlab runner dind service cannot be used with Testcontainers
When using Gitlab runner with the docker executor on a recent Docker Engine version - where links are deprecated and the default bridge...
Read more >
Deploy a Web Application on EC2 in 1 hour - Nexocode
To observe the effects of your efforts, visit your domain. ... 30 seconds – just run the run-redeploy-domain.sh script and wait two minutes ......
Read more >
"Timed out waiting for container port to open" with GitLab CI ...
This was apparently just due to the lack of docker-compose installation on Gitlab runners. I ended up using an ElasticsearchContainer ...
Read more >
sitemap_1.xml - Travis CI Community
... 2020-12-27T12:40:30Z https://travis-ci.community/t/github-project-that-was-previously-on-org-does-not-run-at-com/12056 2021-10-09T14:40:18Z ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found