testcontainers / testcontainers/testcontainers-java

Podman with Docker-compose not working

Open
#5,351 15 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/docker-compose client/podman
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Trying to get testcontainers work with Podman and Docker-compose in Fedora 35 OS to run tests on a custom Kafka cluster. Tried the following approaches but all of them are failing:

1st Approach:
@Container
private static final DockerComposeContainer kafka = new DockerComposeContainer(
new File("src/test/resources/compose-test.yml")).withOptions("--compatibility")
.withExposedService(KAFKA_SERVICE, KAFKA_PORT,
Wait.forListeningPort().withStartupTimeout(Duration.ofSeconds(360)))
.withLocalCompose(true);

This approach throws the below error "Link is not supported"
image

Seemingly related to the deprecated addLink method below:
image

2nd Approach:
@Container
private static final DockerComposeContainer kafka = new DockerComposeContainer(
new File("src/test/resources/compose-test.yml")).withOptions("--compatibility")
.waitingFor(KAFKA_SERVICE, Wait.defaultWaitStrategy().withStartupTimeout(Duration.ofSeconds(360)))
.withLocalCompose(true);

This approach simply throws a null pointer error:
image

3rd Approach:
@Container
private static final DockerComposeContainer kafka = new DockerComposeContainer(
new File("src/test/resources/compose-test.yml")).withOptions("--compatibility")
.waitingFor(KAFKA_SERVICE, Wait.defaultWaitStrategy().withStartupTimeout(Duration.ofSeconds(360)));

This approach throws the below error:
image
image
But, the file in the error has Read/Write/Execute permissions for all users.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DockerComposeContainer declarations in the issue and the referenced src/test/resources/compose-test.yml. Reproduce the three configurations with Podman on Fedora 35, then trace the reported “Link is not supported,” null-pointer, and permission failures. Done means the Kafka compose setup runs successfully and the reported errors no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, java, kafka
Domain
devops, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.