Skip to content
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

Support testcontainers to run inside a docker container with mounted docker.socket #213

Closed
farodin91 opened this issue Feb 25, 2020 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@farodin91
Copy link
Contributor

Is your feature request related to a problem? Please describe.
testcontainers-java supports running testcontainers inside a containers and access side spawned containers

Describe the solution you'd like
Instead of using localhost(127.0.0.1), testcontainers should use the gateway ip container if it is running inside a container: https://github.com/testcontainers/testcontainers-dotnet/blob/develop/src/TestContainers/Core/Containers/Container.cs#L195-L212

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Feb 26, 2020
@HofmeisterAn HofmeisterAn added this to the 1.3.0 milestone Feb 26, 2020
@HofmeisterAn
Copy link
Collaborator

HofmeisterAn commented Feb 26, 2020

I think we just need to extend:

https://github.com/HofmeisterAn/dotnet-testcontainers/blob/173aa1ff6c854df79e603175db2d6c6b772f4507/src/DotNet.Testcontainers/Containers/Modules/TestcontainersContainer.cs#L73

A PR is welcome, would you like to do that? I hope we get the official repository working in the next few days and are able to switch.

@farodin91
Copy link
Contributor Author

I will work on it. It could be not that easy to add a test beside an unit test.

farodin91 added a commit to farodin91/dotnet-testcontainers that referenced this issue Feb 27, 2020
farodin91 added a commit to farodin91/dotnet-testcontainers that referenced this issue Feb 27, 2020
@HofmeisterAn
Copy link
Collaborator

@farodin91 Thanks, I'll check and merge it later that day.

farodin91 added a commit to farodin91/dotnet-testcontainers that referenced this issue Feb 27, 2020
farodin91 added a commit to farodin91/dotnet-testcontainers that referenced this issue Feb 27, 2020
farodin91 added a commit to farodin91/dotnet-testcontainers that referenced this issue Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants