git clone https://github.com/Uhuynh/elastic-stack-docker.git git checkout single-node-cluster 主项目结构如下: $ pwd /Users/liuxg/data/elastic-stack-docker $ tree -L 3 . ├── LICENSE ├── Makefile ├── docker-compose.setup.yml ├── docker-compose.yml ├──elasticsearch│ ├─...
(一)Elastic search 1. 拉取镜像:docker pull elasticsearch:7.4.2 2. 创建容器:docker run -d --name es -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -e "discovery.type=single-node" elasticsearch:7.4.2 3. 进入es容器,在文件config/elasticsearch.yml中增加以下跨域信息: ...
1、添加docker-compose.yml文件 version:'3.1'services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.9.3container_name: elasticsearch environment:-"discovery.type=single-node"-"bootstrap.memory_lock=true"-"ES_JAVA_OPTS=-Xms512m -Xmx512m"volumes:- ./elasticsearch.yml:/usr/sha...
privileged:trueenvironment:- cluster.name=elasticsearch-cluster- node.name=node2- node.master=true- node.data=true- http.port:9200- transport.tcp.port:9300- TZ=Asia/Shanghai- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.transport.ssl.enabled=true- xpack.security.tran...
在我们的服务器上创建我们的部署目录,在部署目录下创建docker-compose.yml文件 docker-compose.yml version: '3.8' services: es01: container_name: es01 image:http://docker.elastic.co/elasticsearch/elasticsearch:8.12.2 environment: - discovery.type=single-node ...
在我们的服务器上创建我们的部署目录,在部署目录下创建docker-compose.yml文件 docker-compose.yml version:'3.8'services:es01:container_name:es01image:docker.elastic.co/elasticsearch/elasticsearch:8.12.2environment:-discovery.type=single-node-ELASTIC_PASSWORD=xj2024-TZ=Asia/Shanghaiports:-"9200:9200"-"930...
docker-compose.yml 代码语言:javascript 复制 version:'3.8'services:es01:container_name:es01image:docker.elastic.co/elasticsearch/elasticsearch:8.12.2environment:-discovery.type=single-node-ELASTIC_PASSWORD=xj2024-TZ=Asia/Shanghaiports:-"9200:9200"-"9300:9300"mem_limit:1gvolumes:-./es/config/elastics...
代码语言:bash 复制 cd /data/containers/elasticsearch docker compose up -d 正确执行后,输出结果如下 代码语言:bash 复制 [root@docker-node-1 elasticsearch]# docker compose up -d [+] Running 1/2 ⠸ Network app-tier Created 0.4s ✔ Container es-single Started ...
你也可以根据需要自定义Elasticsearch镜像的配置。这里以Docker Compose为例,创建一个docker-compose.yml文件,并添加以下配置: version: '3' services: elasticsearch: image: elasticsearch:8.5.0 privileged: true environment: - discovery.type=single-node
第二步:创建docker-compose.yml 在我们的服务器上创建我们的部署目录,在部署目录下创建docker-compose.yml文件 docker-compose.yml 复制 version:'3.8'services: es01: container_name: es01 image: docker.elastic.co/elasticsearch/elasticsearch:8.12.2environment:-discovery.type=single-node-ELASTIC_PASSWORD=xj2024...