下面是我的docker-compose.yml
执行后我收到错误
View view = getActivity().findViewById(R.id.color_view);
view.setBackgroundColor(mSelectedColor);
我尝试删除kibana ERROR: The Compose file '.\docker-compose.yml' is invalid because:
Unsupported config option for services.elasticsearch2: 'kibana
因为我现在没有使用kibana.yml。但它仍然存在同样的问题。
删除Kibana服务后,它编译得很好。但是,我想让kibana使用elasticsearx-platinum。我做错了什么?
volumes:
答案 0 :(得分:0)
docker-compose.yaml
中的缩进存在问题:所有kibana
服务的配置都在elasticsearch2
服务配置下。
正确的docker-compose.yaml
是:
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-platinum:6.2.4
container_name: elasticsearch
environment:
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=MagicWord
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- esnet
elasticsearch2:
image: docker.elastic.co/elasticsearch/elasticsearch-platinum:6.2.4
container_name: elasticsearch2
environment:
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=MagicWord
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata2:/usr/share/elasticsearch/data
networks:
- esnet
kibana:
image: docker.elastic.co/kibana/kibana:6.2.4
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
container_name: kibana
environment:
- KIBANA_ELASTICSEARCH_URL=elasticsearch
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=MagicWord
ports:
- 5601:5601
networks:
- esnet
depends_on:
- elasticsearch
volumes:
esdata1:
driver: local
esdata2:
driver: local
networks:
esnet: