docker-compose.yml

   

version: '2'
services:
  elasticsearch:
    container_name: elasticsearch
    image: elasticsearch:6.5.4
    ports:
      - "9200:9200"
      - "9300:9300"
    volumes:
      - "F:/esdocker/da/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
      - "F:/esdocker/da/data:/usr/share/elasticsearch/data"
      - "F:/esdocker/da/plugins:/usr/share/elasticsearch/plugins"
    environment:
      - "ES_JAVA_OPTS=-Xms256m -Xmx512m"
      - "discovery.type=single-node"
      - "COMPOSE_PROJECT_NAME=elasticsearch-server"
    restart: always
  head:
    image: bolingcavalry/elasticsearch-head:6
    container_name: head
    ports:
      - 9100:9100

  

  elasticsearch.yml  

http.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
cluster.name: my-cluster
transport.host: 0.0.0.0
bootstrap.system_call_filter: false
network.host: 0.0.0.0

最后执行:docker-compose.exe -d up

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2020-12-19
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-28
  • 2021-12-26
  • 2021-12-07
  • 2021-04-23
相关资源
相似解决方案