testcontainers-rs icon indicating copy to clipboard operation
testcontainers-rs copied to clipboard

Expose a ctor for Http client to accept custom bollard Docker client.

Open bobmcwhirter opened this issue 3 years ago • 1 comments

I know it's an edge-case, but OSX folks using Podman 4.x can't currently use the CLI, due to inspect differences.

Using the HTTP API works perfectly (and is async, yay). But it also is a non-default usage of Bollard.

By providing a way to customize the Bollard Docker client being used, this patch allows me to use a random, non-standard, OSX/m1->QEMU->podman stack with success.

bobmcwhirter avatar Sep 30 '22 16:09 bobmcwhirter

I know it's an edge-case, but OSX folks using Podman 4.x can't currently use the CLI, due to inspect differences.

What does "currently" mean? Is this expected to be solved eventually in bollard or podman?

thomaseizinger avatar Oct 15 '22 23:10 thomaseizinger

Hiya @thomaseizinger --

All fair comments.

I'll try to remove the directly-exposed Bollard aspect. I have no particular view of bollard, just realized it was used by testcontainers-rs, and I could facility my needs by exposing it. But I can find a better way.

The "currently" means that podman team has learned that their CLI output is non-compatible, and anticipate possibly maybe fixing it in the next major release (eta: who knows!). Their recommendation was the "docker-compatibility API" which is intended for this sort of usage.

Generally-speaking though, the changes I've made (poorly) would enable podman and docker, over http over unix sockets. It's the "over unix sockets" part that is currently not available in testcontainers-rs, and I think would be a useful addition, regardless of podman's roadmap.

bobmcwhirter avatar Oct 25 '22 13:10 bobmcwhirter

Thanks for the PR but we decided to remove support for podman: https://github.com/testcontainers/testcontainers-rs/issues/422.

thomaseizinger avatar Mar 10 '23 12:03 thomaseizinger