testcontainers / testcontainers/testcontainers-java

[Enhancement]: Add ability to supply network to ryuk container

Open
#8,167 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

client/podman type/enhancement
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Module

Core

Synopsis

This is required due to one aspect of rootless podman networking:

https://docs.podman.io/en/latest/markdown/podman-run.1.html#network-mode-net
Screenshot 2024-01-29 at 20 44 31

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

Workaround in this case disable ryuk only.

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 by tracing Ryuk container creation and the existing environment-variable overrides in the Core module. Confirm how a custom network and exposed port would be supplied, then add coverage for Ryuk joining the requested network and being reachable through the configured port.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
networking, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.