Skip to content

docs: clarify usage of TESTCONTAINERS_HOST_OVERRIDE for DinD on Docker Desktop - #6383

Merged
kiview merged 2 commits into
mainfrom
dind-docs
Jan 4, 2023
Merged

kiview merged 2 commits into
mainfrom
dind-docs

Conversation

@kiview

@kiview kiview commented Jan 3, 2023

Copy link
Copy Markdown
Member

While #6282 tried to clarify the usage of Testcontainers in DinD setups on Docker Desktop (based and what we learned about using docker.sock.raw from this comment in Docker Desktop), we actually learned that this won't work when running a DinD setup on Docker Desktop using Docker Compose V2 (this holds true on Mac and on Windows). While we are not sure about the root cause that makes sibling containers inaccessible using the default gateway, we suspect that is can be related to the default Docker Compose network.

However, we identified that configuring TESTCONTAINERS_HOST_OVERRIDE to use docker.host.internal provides a stable experience in all scenarios. Since using DinD requires some manual configuration in the first place, it does not really matter if we have to manually touch the config to use the raw socket or instead use the override, so we can document the widely stable approach instead.

This means, we can also close #4396 now, since this behavior for host ort 0 was an accidental background as outlined by Docker in the comment mentioned above and we now have a good workaround for Docker Desktop.

HofmeisterAn
HofmeisterAn previously approved these changes Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants