- Briefly installing Elasticsearch and Kibana with Docker compose.
- You can work with Elasticsearch and Kibana running in docker environment by following the steps below.
//Windows powershell
mkdir Elasticsearch8.7.1
cd Elasticsearch8.7.1
New-Item -Path "docker-compose.yml"
code .
*NOTE: Before running docker-compose, make sure Docker is installed and running on your computer :)
*
// docker-compose.yml
version: '3'
services:
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.7.1
# 8.x
environment: ['CLI_JAVA_OPTS=-Xms2g -Xmx2g','bootstrap.memory_lock=true','discovery.type=single-node','xpack.security.enabled=false', 'xpack.security.enrollment.enabled=false']
ports:
- 9200:9200
networks:
- elastic
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
deploy:
resources:
limits:
cpus: '2.0'
reservations:
cpus: '1.0'
kibana:
image: docker.elastic.co/kibana/kibana:8.7.1
container_name: kibana
environment:
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: d1a66dfd-c4d3-4a0a-8290-2abcb83ab3aa
ports:
- 5601:5601
networks:
- elastic
deploy:
resources:
limits:
cpus: '2.0'
reservations:
cpus: '1.0'
networks:
elastic:
In the directory where docker-compose is located
docker-compose up
You can see the containers working from Docker Desktop application. Click on the links Elasticsearch and kibana to see that both are ready to use.
Top comments (0)