系统相关
首页 > 系统相关> > docker中es设置密码内存

docker中es设置密码内存

作者:互联网

#拉起容器命令
docker run -d --name elasticsearch --net somenetwork -p 9200:9200 
-p 9300:9300 -e ES_JAVA_OPTS="-Xms512m -Xmx512m" 
-e "discovery.type=single-node"  -e "xpack.security.enabled=true" 
 elasticsearch:7.17.3
#命令解释
 discovery.type 拉起es容器模式
 xpack.security.enabled 相当于开启登录认证
 ES_JAVA_OPTS 创建时,调整内存的分配
增加9200/9300的端口映射

docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -e "discovery.type=single-node"  -e "xpack.security.enabled=true"  elasticsearch:7.17.3

标签:9200,type,OPTS,elasticsearch,内存,docker,9300,es,discovery
来源: https://www.cnblogs.com/7hello7/p/16212043.html