方式1:编写docker-compose.yml version: "3.7" services:elasticsearch:image: "elasticsearch:7.10.1"container_name: elasticsearch_001ports:- "9200:9200"- "9300:9300"