docker - 如何在 Docker compose 3 中设置 path.repo?

标签 docker elasticsearch docker-compose

我有以下 Docker-compose 3 文件:

version: '3'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
    container_name: elasticsearch
    ...
    ...
    volumes:
      - /path/to/elasticsearch:/usr/share/elasticsearch/data
      - /path/to/elasticsearch/backup:/opt/elasticsearch/backup
    ports:
      - 9200:9200
    networks:
      - elasticnetwork

所以,我已经将我的 path.repo 设置为/path/to/elasticsearch/backup。但是,运行 curl http://127.0.0.1:9200/_nodes/?pretty结果没有 path.repo:
"settings" : {
        ...
        "path" : {
          "logs" : "/usr/share/elasticsearch/logs",
          "home" : "/usr/share/elasticsearch"
        },
        ...
      },

我期待看到 "repo" : ["/opt/elasticsearch/backup"]在路径中。

最佳答案

version: "3"
services:
  elasticsearch:
    image: elasticsearch:6.8.2
    environment:
      - 'path.repo=/opt/elasticsearch/backup'

关于docker - 如何在 Docker compose 3 中设置 path.repo?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54878804/

相关文章:

docker - 使用云提供商为Docker计算机提供主机文件

Git 和 Docker 团队工作流程

apache-spark - 有没有人能够将 elasticsearch xpack sql 与 Spark 一起使用?

docker - 在docker上本地访问redis——docker compose

django - postgres 和 docker 组合 : change service status to ready after additional initialization

docker - 如何复制和重命名 Docker 容器?

python-3.x - 如何在docker镜像python3.6中安装ifxpy模块

elasticsearch - 如何限制索引中ElasticSearch文档的最大数量?

python - elasticsearch/Kibana 列表字段为 "?",虽然它在索引中是 "text",为什么?

docker - ping 在 docker 容器中工作但不 curl