testcontainers wait indefinitely without effects when running in Gitlab-CI
See original GitHub issueI’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:
- Created 4 years ago
- Reactions:3
- Comments:30 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in #85. Feel free to reopen if problems persist.
@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