elasticsearch运行官方docker镜像2.3.3
elasticsearch docker    2017-07-19 20:34:47    9   
lightingfire   elasticsearch docker

1、下载镜像:
docker pull index.docker.io/library/elasticsearch:2.3.3

2、修改配置文件:
分别创建目录:
/usr/share/elasticsearch/config
/usr/share/elasticsearch/data
config目录中创建文件:elasticsearch.yml ,内容如下:
-------------------------------------------------- elasticsearch.yml内容 -------------------------------------------------
network.host: 192.168.10.136
-------------------------------------------------- elasticsearch.yml内容 -------------------------------------------------
config目录中创建文件:logging.yml,内容入下
-------------------------------------------------- logging.yml内容 ------------------------------------------------------
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN

appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
-------------------------------------------------- logging.yml内容 ------------------------------------------------------
3、启动镜像
$ docker run -d -v "$PWD/config":/usr/share/elasticsearch/config -v "$PWD/esdata":/usr/share/elasticsearch/data elasticsearch:2.3.3

4、访问地址检查是否启动成功
$ curl 192.168.10.136:9200
得到结果如下:
{
"name" : "Devastator",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.3.3",
"build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
"build_timestamp" : "2016-05-17T15:40:04Z",
"build_snapshot" : false,
"lucene_version" : "5.5.0"
},
"tagline" : "You Know, for Search"
}


 

by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(防止爬虫):http://blog.liuyingguang.cn
OpenBI问答社区:http://openbi.liuyingguang.cn/

Pre: Elasticsearch安装中文分词插件ik(ES 2.3.3 & IK 1.9.3)

Next: alpine docker下elasticsearch2.3 以root用户启动


Table of content