I’m trying to run a single node setup of Elastic and Kibana locally in Docker Compose.
I’ve got a working docker-compose.yaml
:
version: "3.9"
networks:
elastic:
name: elastic
volumes:
elastic:
services:
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.3
mem_limit: 1GB
networks:
- elastic
ports:
- 9200:9200
volumes:
- elastic:/usr/share/elasticsearch/data
kibana:
image: docker.elastic.co/kibana/kibana:8.11.3
networks:
- elastic
ports:
- 5601:5601
However, Kibana doesn’t remember the enrolment. So each time I restart Docker compose, Kibana will ask for the enrolment token. I’m assuming I need to mount a volume for Kibana as well, but I’m not sure what?
2
Answers
Thanks to @xeraas comment I gave up and "slimmed down" the Docker compose example from Elastic
.env
file:It’s a bit of a monster but is there a reason you’re not using the official Docker Compose setup — and you can trim it down to a single Elasticsearch node.
But what you have there will not work well (or with manual intervention) and the new security by default in 8.0+