testcontainers / testcontainers/testcontainers-java
Testcontainers doesn't start the nested containers from a pod on AKS running Podman
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Hi team,
Trying to use TestContainers with Podman inside of a pod on AKS. Unfortunately, it fails to start any of the nested containers. Any idea how we can make this work?
Environment:
A pod running on AKS with the below image
FROM jenkins/inbound-agent:latest-alpine
USER root
RUN apk add podman
Testcontainers to run:
public class ElasticsearchContainerInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext>, Ordered {
private static final String DEFAULT_TAG = "6.5.0";
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName
.parse("docker.elastic.co/elasticsearch/elasticsearch")
.withTag(DEFAULT_TAG);
private static final ElasticsearchContainer ELASTICSEARCH_CONTAINER;
static {
ELASTICSEARCH_CONTAINER = new ElasticsearchContainer(DEFAULT_IMAGE_NAME);
ELASTICSEARCH_CONTAINER.start();
}
public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
TestPropertyValues.of(
"app.resources.elasticsearch.port=" + ELASTICSEARCH_CONTAINER.getMappedPort(9200),
"app.resources.elasticsearch.host=" + ELASTICSEARCH_CONTAINER.getContainerIpAddress()
).applyTo(configurableApplicationContext.getEnvironment());
}
@Override
public int getOrder() {
return 0;
}
}
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
The report provides an AKS pod setup using Podman and an ElasticsearchContainerInitializer, but no repository file, failing test, or error output. Start by reproducing the nested-container failure in that environment; done means the Elasticsearch container starts successfully and its mapped host and port are available to the application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, java, kubernetes
- Domain
- cloud, infrastructure, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100