Getting: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'tcp://10.1.2.3:20000' mount path must be absolute: creating reaper failed: failed to create container

I now use the newest version of Docker Desktop 4.20.1 (system 24.0.2).

It works fine on my Ubuntu 22.04 server, but when I run the same code in CI/CD it fails with the following error:

Getting: Error response from daemon: invalid mount config for type “bind”: invalid mount path: ‘tcp://10.1.2.3:20000’ mount path must be absolute: creating reaper failed: failed to create container

As we can see, the connection path is actually using a URI instead of a simple path. (in the past, it was unix:/var/run/docker.sock)

My code uses the Golang version of the libraries to access the docker system. I use the testcontainers package so I don’t know all the details from the library. I worked with older versions. This newer version generates that error, which mentions a path that we don’t have any control over.

What does the message mean exactly? What absolute path is it requesting? In the “tcp://10.1.2.3:20000” URI, the path is /, so it is absolute.

Which testcontainers-go version are you using? In the most recent ones we worked in adding stability to the reaper. FYI v0.34.0 is the latest release.

Also, if possible, could you paste the test log output, including the -v flag to the go test command? :pray:

Hi Manuel,

That was a long time ago. I have no clue with test I was running and/or whether I fixed the issue or just went in a different direction. Sorry I just can’t help further.

Yeah, I’m sorry for this late response, but I knew about the existence of this Testcontainers category in the Docker forums yesterday.

So, if you agree, in closing this one.

Btw, are you still using Testcontainers for Go?

Hi Manuel,

Yes. We still make use of the testcontainers (v0.33.0 at the moment).

This question can be closed, for sure. :slight_smile:

Thank you.
Alexis

Fantastic! Hope the library is helping you in enabling you in providing the best quality possible in your projects.