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

Running testcontainers on remote machine does not work anymore due to Resource Reaper #464

Closed
s-rech opened this issue May 31, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@s-rech
Copy link
Contributor

s-rech commented May 31, 2022

Describe the bug
The WithDockerEndpoint method is very useful in case the local machine does not support running containers, because it allows running testcontainers on some remote machine. However, this use case doesn't work anymore (in some circumstances) due to the introduction of the Resource Reaper. The reason being that dotnet-testcontainers will always try to run the Resource Reaper container locally.

A potential solution would be to always start the Resource Reaper container on the same host which is also supposed to run the actual testcontainer of interest.

To Reproduce
Steps to reproduce the behavior:

  1. Use a host machine which does not support running containers locally
  2. Create a test which starts up a testcontainer using the WithDockerEndpoint on some (Linux-based) remote machine
  3. Run the test and see some exception due to the incapability to let the Resource Reaper container run locally.

Expected behavior
The testcontainer should be started and not exception should be thrown.

s-rech referenced this issue in s-rech/dotnet-testcontainers May 31, 2022
{Made Resource Reaper compatible to containers being started on remote machines via use of `WithDockerEndpoint` method.}
s-rech referenced this issue in s-rech/dotnet-testcontainers May 31, 2022
{Repositioned new property `Hostname` to avoid Code Smell.}
@HofmeisterAn HofmeisterAn added the enhancement New feature or request label May 31, 2022
@HofmeisterAn HofmeisterAn added this to the 1.6.0 milestone May 31, 2022
s-rech referenced this issue in s-rech/dotnet-testcontainers May 31, 2022
{Improved code according to requested changes.}
HofmeisterAn pushed a commit that referenced this issue May 31, 2022
…ceReaper'

{Add optional Docker API endpoint.}
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

No branches or pull requests

2 participants