-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Podman with Docker-compose not working #5351
Comments
Would you expect that Podman works together with Docker Compose outside of Testcontainers? Can you give a CLI example of how Podman can work with Docker Compose? |
@kiview, thanks for your response. I am using the below CLI commands to make Podman work with Docker-compose ##or## systemctl --user enable podman.socket Reference: |
I'm seeing better behaviour than this on podman 4.3.1 (rootless). But im seeing issue surrounding socat initialisation:
It looks like there is a similar reported side effect issue for this problem. But i suspect it also might be due to the slirp networking functionality. Further investigation looks like this is actually a failure in starting the socat container due to using the 'link' functionality not matching names in GenericContainer::findLinksFromThisContainer due to snake vs kebab naming There also looks like some other issues here with podman around naming (in regards to linking which is moot since podman linking fails independent of correctly named containers/links Looks like this might stem from go vs python docker-compose implementations
so perhaps a compat flag is required to allow kebab naming in https://github.com/testcontainers/testcontainers-java/blob/main/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java#L430) |
I do have docker-compose from CLI working with Podman Desktop on Mac, so that generally does work. Any attempt at running Testcontainer's
This seems to be because Testcontainer makes use of Legacy container links, which is deprecated also in Testcontainer's own API (as @ssrikanthc pointed out). With Testcontainers 1.19.3, this seems to be happening in The workaround seems to be not to use There is #465, which lists as "Modify Docker Compose support; can we remove use of the ambassador container now?" as a completed task? |
Hi, Is there an update on this issue? We are facing similar problems after moving from docker desktop to podman. Podman compose without testcontainers work on that docker-compose.yaml |
Hi @chenlin2001 , I'm not sure I had the same error, but concerning Permission denied errors you might want to have a look at https://gist.github.com/jfrantzius/0996e224cbe81d885553ece6f8abf99a#status-500-lsetxattr-varrundockersock-operation-not-permitted |
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](https://user-images.githubusercontent.com/22582795/167110168-f82f11a8-7c9c-4dd0-916e-42ec29c2742e.png)
Seemingly related to the deprecated addLink method below:
![image](https://user-images.githubusercontent.com/22582795/167109213-e646b63a-eb00-444b-93b2-36b459e51207.png)
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](https://user-images.githubusercontent.com/22582795/167110734-7d1667c1-cd9a-48b3-9d45-c0b724197c8f.png)
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](https://user-images.githubusercontent.com/22582795/167111361-5aff74e9-2b44-427c-b1dc-25312aa4c0d5.png)
![image](https://user-images.githubusercontent.com/22582795/167111477-5e9337aa-267a-4517-a085-6c54850c2792.png)
But, the file in the error has Read/Write/Execute permissions for all users.
The text was updated successfully, but these errors were encountered: