You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Enhancement]: Add ability to supply network to ryuk container #8167
This implies that network is not picked up when runnig podman in rooless mode thus making it impossible for ryuk to communicate with other containers even if they were started with --network=bridge network
Proposal
Tescontainer can run using custom network (auto created via Network.createNetwork() or external) and ryuk in this case cannot be customized to use the same custom network. Some environmet can have restrictions on default network, or even have different access to each other. In this case ryuk could not see the containers at all.
Since Testcontainer already has custom env varible to override some functionality will be great to have custom varible to define:
custom expose port for ryuk
custom network name which ryuk container should connect during creation
changed the title [-][Enhancement]: Add ability to custom ryuk container[/-][+][Enhancement]: Add ability to customize ryuk container[/+]on Jan 29, 2024
changed the title [-][Enhancement]: Add ability to customize ryuk container[/-][+][Enhancement]: Add ability to supply network to ryuk container[/+]on Jan 29, 2024
This would also help on VSCode devcontainers. Currently the only way to solve this issue is to disable ryuk and calling .withNetworkMode(network), supplying the devcontainer bridge network as the parameter.
@ChaosWars Can you please elaborate on the devcontainer issue? Wouldn't the devcontainer run using Docker socket mounting, so having Testcontainers containers as sibling containers?
@vkravets As of now, we don't intend to add Podman-specific changes to the project, but we have good experiences with opening such topics up with the Podman project, since they generally want to get closer to the drop-in Docker replacement claim, and this is clearly a difference in behavior.
@kiview I've messed around with ryuk and podman and it seems that the fundamental issue is rootless containers. Podman can be (mostly) a drop-in when running rootful though. I'm trying to work on getting rootless somewhat functional in a fork; if I were to submit a PR to the Ryuk repo eventually for adding this functionality, could I ask for a review?
Unset (default): no behavior change — Ryuk keeps running on the default network exactly as today.
Set: the Ryuk container is attached to the given pre-existing network (as its network mode) instead of the default bridge, so Ryuk can see and clean up containers running in custom networks — rootless Podman, devcontainers, or environments where the default network is restricted.
The connection from the test JVM to Ryuk keeps working through the already published port (getHost() + mapped port), so nothing changes there.
The issue also mentions a custom exposed port for Ryuk. I'd suggest keeping this change to the network property only for now; if there are environments that also need a fixed published port for Ryuk, I'm happy to extend it.
Feedback welcome — if there are no objections, I'll open a PR implementing ryuk.container.network with docs and unit tests.
Activity
[-][Enhancement]: Add ability to custom ryuk container[/-][+][Enhancement]: Add ability to customize ryuk container[/+][-][Enhancement]: Add ability to customize ryuk container[/-][+][Enhancement]: Add ability to supply network to ryuk container[/+]ChaosWars commentedon May 27, 2024
This would also help on VSCode devcontainers. Currently the only way to solve this issue is to disable ryuk and calling
.withNetworkMode(network), supplying the devcontainer bridge network as the parameter.kiview commentedon May 27, 2024
@ChaosWars Can you please elaborate on the devcontainer issue? Wouldn't the devcontainer run using Docker socket mounting, so having Testcontainers containers as sibling containers?
@vkravets As of now, we don't intend to add Podman-specific changes to the project, but we have good experiences with opening such topics up with the Podman project, since they generally want to get closer to the drop-in Docker replacement claim, and this is clearly a difference in behavior.
Kelavandoril commentedon Aug 1, 2026
@kiview I've messed around with ryuk and podman and it seems that the fundamental issue is rootless containers. Podman can be (mostly) a drop-in when running rootful though. I'm trying to work on getting rootless somewhat functional in a fork; if I were to submit a PR to the Ryuk repo eventually for adding this functionality, could I ask for a review?
Inf1mum commentedon Nov 4, 2026
I'd like to work on this on the Java side, keeping Ryuk's startup behavior unchanged unless explicitly configured.
Proposed property:
ryuk.container.network(follows the existingryuk.container.*convention, cf.ryuk.container.image,ryuk.container.privileged,ryuk.container.timeout)Semantics:
The connection from the test JVM to Ryuk keeps working through the already published port (
getHost()+ mapped port), so nothing changes there.The issue also mentions a custom exposed port for Ryuk. I'd suggest keeping this change to the network property only for now; if there are environments that also need a fixed published port for Ryuk, I'm happy to extend it.
Feedback welcome — if there are no objections, I'll open a PR implementing
ryuk.container.networkwith docs and unit tests.