testcontainers / testcontainers/testcontainers-java
Podman with Docker-compose not working
Nobody has claimed this yet.
- 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"

Seemingly related to the deprecated addLink method below:

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:

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:


But, the file in the error has Read/Write/Execute permissions for all users.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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