I am doing Nodejs development within a WSL2 environment in an Ubuntu distribution. To build and run container images I am using podman installed within the ubuntu distribution (podman ubuntu). To write integration tests I want to use testcontainers. Unfortunately, executing tests with testcontainers fails with error: No Docker client strategy found
After some research here, here, here and here I somehow need to create a podman service and forward the DOCKER_HOST to the socket. Unfortunately creating a podman service in ubuntu did not work as commands like systemctl
are not working. Therefor I installed podman on windows as described here. (podman windows) As a result there is a podman service installed in a separate WSL2 fedora environment. (podman fedora)
To summarize, there is podman (fedora), podman (windows) and podman (ubuntu).
The communication between podman (windows) to podman (fedora) works very well. I tried to set the very same connection to podman (ubuntu) but unfortunately this connection does not work. Podman accepts the connection but always returns the local dataset instead of the dataset of podman (fedora). I manually opened a ssh connection and assigned the socket to the DOCKER_HOST as described here. This works fine but the test fails as it cannot find the image. The image is not found as the image is build with podman (ubuntu) but testcontainers is looking within podman (fedora).
Any ideas what needs to be done to connect the podman (ubuntu) to podman (fedora)? Or any other idea to get the setup up and running in WSL2 and Ubuntu?