elasticsearch 安装
version: '3' services: elasticsearch: image: elasticsearch:7.7.1 container_name: elasticsearch2 networks: - net-es volumes: - ../data/elasticsearch/data:/usr/share/elasticsearch/data #这里将elasticsearch的数据文件映射本地,以保证下次如果删除了容器还有数据 environment: - discovery.type=single-node - ES_JAVA_OPTS=-Xms256m -Xmx256m ports: - "9200:9200" kibana: image: daocloud.io/library/kibana:7.7.1 container_name: kibana networks: - net-es ports: - "5601:5601" depends_on: - "elasticsearch" links: - "elasticsearch" #这里要注意,es和eshd要在相同网络才能被links networks: net-es: external: false
http://ip:5601