Skip to content

[Bug]: Broken pipe when creating container with podman #7539

@Sgitario

Description

@Sgitario

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 #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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions