[root@VM-24-17-centos ~]# cat /proc/sys/vm/max_map_count
65530
[root@VM-24-17-centos ~]# sysctl -w vm.max_map_count=262144
vm.max_map_count = 262144
#先创建出相应目录:/opt/dockerV/es/…
docker run -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" \
-v /opt/dockerV/es/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /opt/dockerV/es/data:/usr/share/elasticsearch/data \
-v /opt/dockerV/es/plugins:/usr/share/elasticsearch/plugins \
--name ES01 elasticsearch:7.17.5
#报错了:docker: error pulling image configuration: download failed after attempts=6: dial tcp 104.18.124.25:443: i/o timeout.
解决方案:配置阿里云/腾讯云镜像地址: “registry-mirrors”: [“https://yxzrazem.mirror.aliyuncs.com”]
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://mirror.ccs.tencentyun.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker