Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active April 2, 2023 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacr/8f03e710f78cdbaa1bc3a5f567c2aae5 to your computer and use it in GitHub Desktop.
Save dacr/8f03e710f78cdbaa1bc3a5f567c2aae5 to your computer and use it in GitHub Desktop.
start an elasticsearch through docker / published by https://github.com/dacr/code-examples-manager #b1cb8f97-f6af-4ecf-8664-e20f0c5946a2/2b69a9ecc2cf587ffdc6d665e4c1f2e2512da437
## summary : start an elasticsearch through docker
## keywords : bash, elasticsearch, docker, code-examples-manager, cem
## publish : gist
## authors : David Crosson
## license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
## id : b1cb8f97-f6af-4ecf-8664-e20f0c5946a2
## created-on : 2021-04-29T16:52:54Z
## managed-by : https://github.com/dacr/code-examples-manager
## execution : bash
DKFILE="/tmp/cem-docker-compose.yml"
echo '
version: "3"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
networks:
- elastic
kibana:
image: docker.elastic.co/kibana/kibana:7.12.1
depends_on:
- elasticsearch
ports:
- 5601:5601
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
networks:
- elastic
networks:
elastic:
external:
name: docker_default
' > ${DKFILE}
docker-compose -f ${DKFILE} up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment