Docker Compose 知识点
- docker-compose.yml 中文件格式版本 version 配置项值,与 Docker Engine 兼容性:https://docs.docker.com/compose/compose-file/compose-versioning/#compatibility-matrix
Please note that this configuration exposes port 9200 on all network interfaces, and given how Docker manipulates iptables on Linux, this means that your Elasticsearch cluster is publicly accessible, potentially ignoring any firewall settings. If you don’t want to expose port 9200 and instead use a reverse proxy, replace 9200:9200 with 127.0.0.1:9200:9200 in the docker-compose.yml file. Elasticsearch will then only be accessible from the host machine itself.
出处:https://www.elastic.co/guide/en/elasticsearch/reference/7.16/docker.html#docker-compose-file