Open
Description
openedon Jun 6, 2022
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment