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

fix: Use the actual Docker endpoint to extract the socket path for the Resource Reaper #930

Conversation

HofmeisterAn
Copy link
Collaborator

What does this PR do?

Instead of relying on the automatically discovered Docker endpoint to retrieve the Docker socket, the pull request utilizes the actual Docker endpoint. If the auto-discovery mechanism fails to detect a Docker endpoint and the user manually configures the Docker endpoint using the builder API, Testcontainers will encounter a null reference exception during runtime.

Why is it important?

The fix is significant because it allows the support of test environments where the auto-discovery mechanism cannot detect a Docker endpoint (although this is not recommended).

Related issues

How to test this PR

@paule96 Would it be possible for you to test the fix and see if it resolves the issue? It is a bit challenging to set up a test in CI due to the required remote Docker endpoint, etc.

@HofmeisterAn HofmeisterAn added the bug Something isn't working label Jun 22, 2023
@HofmeisterAn HofmeisterAn marked this pull request as ready for review June 22, 2023 08:21
@netlify
Copy link

netlify bot commented Jun 22, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 65f780c
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/6494047d8da96b00080c4521
😎 Deploy Preview https://deploy-preview-930--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@paule96
Copy link

paule96 commented Jun 23, 2023

@HofmeisterAn is there some PR packages that I can use? Or do I need to download the branch source code and build it by myself? I can try to do it today or tomorrow depends on a bit of my calendrer.

@paule96
Copy link

paule96 commented Jun 23, 2023

this fix works for me.

Maybe an important side note:

In the issue to this PR you recommended to set DOCKER_HOST to some value, this didn't helped.

@HofmeisterAn
Copy link
Collaborator Author

@HofmeisterAn is there some PR packages that I can use? Or do I need to download the branch source code and build it by myself? I can try to do it today or tomorrow depends on a bit of my calendrer.

Unfortunately, there is no NuGet package. You need to checkout the branch.

@paule96
Copy link

paule96 commented Jun 23, 2023

yeah I did it like that now because I had a bit of time. lgtm 👍

@HofmeisterAn HofmeisterAn merged commit 0ecda30 into develop Jun 23, 2023
@HofmeisterAn HofmeisterAn deleted the bugfix/929-use-actual-docker-endpoint-to-detect-docker-socket-mount branch June 23, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: If you want a remote host from windows it will fail with a null reference exception
2 participants