testcontainers-java
testcontainers-java copied to clipboard
[Bug]: Broken pipe when creating container with podman
Module
Core
Testcontainers version
1.18.3
Using the latest Testcontainers version?
Yes
Host OS
Linux
Host Arch
x86
Docker version
podman version is 4.6.2
What happened?
This is a duplicate of https://github.com/testcontainers/testcontainers-java/issues/6640 that was closed but not fixed (I can't reopen it). For example, using the PostgreSQL container like:
@Testcontainers
class MyTest {
@Container
static PostgreSQLContainer db = new PostgreSQLContainer();
@Test
void test() {
// ....
}
}
Will randomly fail with Broken pipe when creating container.
I configured podman-docker and socket using:
sudo dnf install podman podman-docker
systemctl --user enable podman.socket --now
podman system service --time=0
Check podman socket is listening:
podman info | grep -A2 'remoteSocket'
This command should print:
remoteSocket:
exists: true
path: /path/to/podman.sock
And configure testcontainers to connect to the podman socket:
export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock
export TESTCONTAINERS_RYUK_DISABLED=true
Relevant log output
No response
Additional Information
No response
We are experiencing the same behavior on:
- podman version 4.6.1
- testcontainers 1.19.2
Using GenericContainer construct.
In Quarkus QE we face with the same problem. Running on RHEL 8.9 with podman and testcontainers using GenericContainer construct.
- podman version 4.6.1
- testcontainers 1.19.3
Experiencing this with:
- TestContainers java 1.20.0
- Podman 4.9.4-rhel
- RockyLinux 8.8
Please open an issue with Podman about this, I will close this issue, since we are only supporting Docker runtimes officially and expect other runtimes to behave in a similar way.