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

How to connect with Docker in Docker (dind) in a tekton pipeline #297

Open
dosper7 opened this issue Jul 5, 2023 · 1 comment
Open

How to connect with Docker in Docker (dind) in a tekton pipeline #297

dosper7 opened this issue Jul 5, 2023 · 1 comment

Comments

@dosper7
Copy link

dosper7 commented Jul 5, 2023

I'm trying to execute some integration tests using a docker-compose file that I'm passing it to the FluentDocker.

Locally (windows machine) it works ok because (I assume) I already have the docker running, so the FluentDocker knows how to connect to it.

In my case, I'm running a dind, so the tests are in one pod, and the docker is on another pod,
I'm getting this error:
Ductus.FluentDocker.Common.FluentDockerException : Failed to find docker client binary - please add it to your path

I was using TestContainers and that was working ok (both locally and in the tekton pipelines) but then I switched to docker-compose to use the same file that we use on our day-to-day work and avoid having different versions in TestContainers vs docker-compose.

How to tell FluetDocker to communicate with that docker engine and not a "local" one? I think it's the http api vs native (correct me if I'm saying anything stupid 😄 )

@vmandic
Copy link

vmandic commented Aug 31, 2023

+1 interested, I have a dotnet core application that runs tests via dotnet test and I installed docker-cli and docker-compose to my test image with other deps as:

RUN apk add --update nodejs yarn docker-cli docker-compose && rm -rf /var/cache/apk/

And when running pass the docker.sock as volume:

docker run --rm -v $(pwd):/app -v "/var/run/docker.sock:/var/run/docker.sock:rw" -w /app company/test-app yarn test:integration

But as this is already within gitlab DinD image CI/CD in my case I'd love to see if I can skip that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants