docker中安装elasticsearch7

mkdir -p /opt/es7/config
mkdir -p/opt/es7/data
echo "network.host: 0.0.0.0" >> /opt/es7/config/elasticsearch.yml

docker run --name es7 -p 9200:9200 -p 9300:9300 
-e "discovery.type=single-node" 
-e ES_JAVA_OPTS="-Xms128m -Xmx512m" 
-v /opt/es7/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
-v /opt/es7/data:/usr/share/elasticsearch/data 
-v /opt/es7/plugins:/usr/share/elasticsearch/plugins 
-d elasticsearch:7.13.2
原文地址:https://www.cnblogs.com/powerbear/p/14900391.html