version: '2.2'services: cerebro: image: lmenezes/cerebro:0.8.4 container_name: cerebro ports: - "9000:9000" command: - -Dhosts.0.host=http://elasticsearch:9200 networks: - es7net kibana: image: kibana:7.5.0 container_name: kibana750 environment: - XPACK_GRAPH_ENABLED=true - TIMELION_ENABLED=true - XPACK_MONITORING_COLLECTION_ENABLED="true" ports: - "5601:5601" networks: - es7net elasticsearch: image: elasticsearch:7.5.0 container_name: es750 environment: - cluster.name=haha - node.name=es750 - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms1g -Xmx1g" - discovery.seed_hosts=es750 - cluster.initial_master_nodes=es750 ulimits: memlock: soft: -1 hard: -1 volumes: - es750data1:/Users/haha/dockerdata/elasticsearch/data - "./elasticsearch/plugins/ik:/usr/share/elasticsearch/plugins/ik" ports: - 9200:9200 - 9300:9300 networks: - es7netvolumes: es750data1: driver: localnetworks: es7net: driver: bridge
docker-compose指令默认文件名:docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml
#启动docker-compose up#后台启动 docker-compose up -d#停止容器docker-compose down#停止容器并且移除数据docker-compose down -v
Elasticsearchhttp://localhost:9200/
Cerebrohttp://localhost:9000/
Kibanahttp://localhost:5601/
IK分词器下载 地址,解压放到./elasticsearch/plugins/ik这个相对目录(执行命令的相对目录)Release v7.5.0 · medcl/elasticsearch-analysis-ik · GitHubThe IK Analysis plugin integrates Lucene IK analyzer into elasticsearch, support customized dictionary、- Release v7.5.0 · medcl/elasticsearch-analysis-ikhttps://github.com/medcl/elasticsearch-analysis-ik/releases/tag/v7.5.0
验证
GET /_analyze{ "analyzer": "ik_max_word", "text":"你好,我是中国人"}
问题 virtual memory areas vm.max_map_count [65530] is too low, increase to > at least [262144]">bootstrap checks failed | max > virtual memory areas vm.max_map_count [65530] is too low, increase to > at least [262144]https://stackoverflow.com/questions/57998092/docker-compose-error-bootstrap-checks-failed-max-virtual-memory-areas-vm-maCMD或者PowerShell执行一下命令
wsl -d docker-desktopecho 262144 >> /proc/sys/vm/max_map_count