【问题标题】:How to configure elasticsearch testcontainers to use the latest ES如何配置elasticsearch testcontainers 使用最新的ES
【发布时间】:2021-01-15 09:37:03
【问题描述】:
testCompile "org.testcontainers:elasticsearch:1.14.3"

如何配置elasticsearch testcontainers使用最新的ES(比如7.9.2),上面是用6.4.1的镜像来代替

【问题讨论】:

    标签: elasticsearch spring-data-elasticsearch testcontainers


    【解决方案1】:

    在你启动测试容器的地方,指定想要的镜像名称:

    ElasticsearchContainer elasticsearchContainer = 
      new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch:7.9.2");
    elasticsearchContainer.start();
    

    【讨论】:

      猜你喜欢
      • 2019-05-24
      • 2017-09-05
      • 2021-10-28
      • 2019-01-18
      • 2019-04-04
      • 1970-01-01
      • 1970-01-01
      • 2021-11-06
      • 1970-01-01
      相关资源
      最近更新 更多