-
Notifications
You must be signed in to change notification settings - Fork 305
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
Docker in docker test fails with "Error while fetching server API version" #329
Comments
I have the same problem on a M1 Mac. All of a sudden it started to crash. I guess it has something to do with the new version of Docker, I upgraded yesterday, until then it worked. Edit: I can confirm that downgrading makes testcontainers work again |
Thanks for reporting, @dfioravanti. I also observe the issue on my M1.
Which version did you use to make the docker-in-docker tests work again? |
Hey @tillahoffmann, sorry I should have been more precise. I have this problem on docker desktop. In the gitlab CI we use it still works, but that runs on linux. In any case, locally I am running |
@tillahoffmann, there's a decent number of things that could have caused this as far as I can see. I don't think the CI failing suddenly and that you and @dfioravanti are seeing issues with a new version of docker desktop are unrelated. There's probably been some change in how the docker api behaves in the new version (could be a change in endpoint, response, tls, etc.) that the docker client can't deal with, but it's strange that it only shows up with the DinD tests. My guess is some sort of verification on the calls to the docker api, but that's nothing more than my best guess without having looked into it at all. I'll look into this when I have the time, which will probably be after the weekend. |
in my case issue appeared after Docker Desktop upgrade v4.21.1 on M1.
|
@gooner22 Thanks a lot, I forgot how I had fixed this and I had the same problem on a new machine. I have no idea why I did not comment my solution here 🤦 You saved me quite a lot of work finding it out |
@gooner22 Thanks! I had it enabled, but after disable+enable it fixed my issue |
@gooner22 thanks a lot! |
I'm also running into this. I use In Java it seems to work, because it respects
Edit: As a workaround, you can |
🤖 I have created a release *beep* *boop* --- ## [4.2.0](testcontainers-v4.1.0...testcontainers-v4.2.0) (2024-03-24) ### Features * support influxdb ([#413](#413)) ([13742a5](13742a5)) ### Bug Fixes * **arangodb:** tests to pass on ARM CPUs - change default image to 3.11.x where ARM image is published ([#479](#479)) ([7b58a50](7b58a50)) * **core:** DinD issues [#141](#141), [#329](#329) ([#368](#368)) ([b10d916](b10d916)) * **core:** raise an exception when docker compose fails to start [#258](#258) ([#485](#485)) ([d61af38](d61af38)) * **core:** use auto_remove=True with reaper instance ([#499](#499)) ([274a400](274a400)) * **docs:** update the non-existent main.yml badge ([#493](#493)) ([1d10c1c](1d10c1c)) * Fix the return type of `DockerContainer.get_logs` ([#487](#487)) ([cd72f68](cd72f68)) * **keycloak:** tests on aarch64, use image from [jboss -> quay], change supported version [16+ -> 18+] ([#480](#480)) ([5758310](5758310)) * **postgres:** doctest ([#473](#473)) ([c9c6f92](c9c6f92)) * read the docs build works again ([#496](#496)) ([dfd1781](dfd1781)) * readthedocs build - take 1 ([#495](#495)) ([b3b9901](b3b9901)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ntainers#368) Fix testcontainers#141 - find IP from custom network if the container is not using the default network Close testcontainers#329 - This seems fixed in the underlying docker libraries. Improve support for Docker in Docker running on a custom network, by attempting to find the right custom network and use it for new containers. This adds support for using testcontainers-python running the GitHub Actions Runner Controller to run self-hosted actions runners on prem, when you run your workflows in containers. --------- Co-authored-by: Dee Moore <dee42moore@gmail.com> Co-authored-by: David Ankin <daveankin@gmail.com> Co-authored-by: Balint Bartha <39852431+totallyzen@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [4.2.0](testcontainers/testcontainers-python@testcontainers-v4.1.0...testcontainers-v4.2.0) (2024-03-24) ### Features * support influxdb ([testcontainers#413](testcontainers#413)) ([13742a5](testcontainers@13742a5)) ### Bug Fixes * **arangodb:** tests to pass on ARM CPUs - change default image to 3.11.x where ARM image is published ([testcontainers#479](testcontainers#479)) ([7b58a50](testcontainers@7b58a50)) * **core:** DinD issues [testcontainers#141](testcontainers#141), [testcontainers#329](testcontainers#329) ([testcontainers#368](testcontainers#368)) ([b10d916](testcontainers@b10d916)) * **core:** raise an exception when docker compose fails to start [testcontainers#258](testcontainers#258) ([testcontainers#485](testcontainers#485)) ([d61af38](testcontainers@d61af38)) * **core:** use auto_remove=True with reaper instance ([testcontainers#499](testcontainers#499)) ([274a400](testcontainers@274a400)) * **docs:** update the non-existent main.yml badge ([testcontainers#493](testcontainers#493)) ([1d10c1c](testcontainers@1d10c1c)) * Fix the return type of `DockerContainer.get_logs` ([testcontainers#487](testcontainers#487)) ([cd72f68](testcontainers@cd72f68)) * **keycloak:** tests on aarch64, use image from [jboss -> quay], change supported version [16+ -> 18+] ([testcontainers#480](testcontainers#480)) ([5758310](testcontainers@5758310)) * **postgres:** doctest ([testcontainers#473](testcontainers#473)) ([c9c6f92](testcontainers@c9c6f92)) * read the docs build works again ([testcontainers#496](testcontainers#496)) ([dfd1781](testcontainers@dfd1781)) * readthedocs build - take 1 ([testcontainers#495](testcontainers#495)) ([b3b9901](testcontainers@b3b9901)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
FYI I was able to make it work with the |
The
core/tests/test_docker_in_docker.py::test_wait_for_logs_docker_in_docker
test has started failing in CI without an obvious reason (see here for an example run). docker/docker-py#2717 may be related. @Duchadian, do you have thoughts on this?The text was updated successfully, but these errors were encountered: