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

docker-in-docker (ryuk support) doesn't work testcontainers-dotnet #68

Closed
jonesbusy opened this issue Jan 17, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@jonesbusy
Copy link

Hi,

We are using kubedock 0.15.1 on OKD with ryuk support and it works well with testcontainers-java and testcontainers-node modules.

But a behavior is different with testcontainers-dotnet with the bind mount volume.

From reading the code the dind-sidecar is added when a target /var/run/docker.sock

func (in *instance) addDindSidecar(tainr *types.Container, pod *corev1.Pod) error {

Works for Java and Node testcontainer module

ryuk_java

But the .NET implementation fail because not sidecar is created

ryuk

CI is run on Jenkins pipeline and environment is similar to all implementation

pipeline {
  agent {
    kubernetes {
        yaml(
           // dotnet container and kubedock here
        }
    }
  }
  environment {
    ...
    DOCKER_HOST = 'tcp://localhost:2475'
    ...
  }
  ....
}

So I suspect something is different from the node and other testcontainer implementation.

But looking at the code the unix socket mount is added correctly : https://github.com/testcontainers/testcontainers-dotnet/blob/develop/src/Testcontainers/Containers/ResourceReaper.cs#L416 and working when running on a docker environment

I'm wonder if it's something similar to #30 (comment)

Let me know if I can provide more information

Thanks!

@joyrex2001 joyrex2001 added the bug Something isn't working label Jan 17, 2024
@joyrex2001
Copy link
Owner

Hi @jonesbusy, thanks for these details. Looks like you were right with regards to it failing due to the missing hostconfig mount support. I added that, and the dind-sidecar is now being created when ryuk is enabled.

@jonesbusy
Copy link
Author

Hi!

I confirm the issue is resolved using 'latest' container image!

Thanks a lot

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

No branches or pull requests

2 participants