Docker 運行ES和Kibana

1. docker pull image    docker pull elasticsearch:6.7.2    docker pull mobz/elasticsearch-head:5    docker pull kibana:6.7.22. run ES in docker    docker run -it --name elasticsearch -d -p 9200:9200 -p 9300:9300 -p 5601:5601 elasticsearch:6.7.2    注意事項   - kibana的container共用elasticsearch的網絡   - elasticsearch服務有跨域問題,致使elasticsearch-head沒法鏈接到ES,所以須要進入ES容器修改配置     - docker exec -it elasticsearch /bin/bash     - vi config/elasticsearch.yml        - 加入跨域配置        http.cors.enabled: true        http.cors.allow-origin: "*"     - docker restart elasticsearch3. run Kibana in docker    - kibana的container共用elasticsearch的網絡    docker run -it -d -e ELASTICSEARCH_URL=http://127.0.0.1:9200 --name kibana --network=container:elasticsearch kibana:6.7.24. run elasticsearch-head in docker    docker run -it --name elasticsearch-head -d -p 9100:9100 docker.io/mobz/elasticsearch-head:5
相關文章
相關標籤/搜索