Skip to content

Instantly share code, notes, and snippets.

@robertlyson
Last active November 14, 2018 19:02
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 robertlyson/71e1d096597ed446836de9b084b3c913 to your computer and use it in GitHub Desktop.
Save robertlyson/71e1d096597ed446836de9b084b3c913 to your computer and use it in GitHub Desktop.
Docker compose file to run elasticsearch and kibana. Please put all of these files in one directory. After docker-compose up command you should be able to access http://localhost:9200 and http://localhost:5601 in your browser.
version: '3'
services:
elasticsearch:
build:
context: .
dockerfile: elasticsearch
args:
ELK_VERSION: 6.2.4
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
kibana:
build:
context: .
dockerfile: kibana
args:
ELK_VERSION: 6.2.4
ports:
- "5601:5601"
depends_on:
- elasticsearch
ARG ELK_VERSION
# https://github.com/elastic/elasticsearch-docker
FROM docker.elastic.co/elasticsearch/elasticsearch-oss:${ELK_VERSION}
# Add your elasticsearch plugins setup here
# Example: RUN elasticsearch-plugin install analysis-icu
ARG ELK_VERSION
# https://github.com/elastic/kibana-docker
FROM docker.elastic.co/kibana/kibana-oss:${ELK_VERSION}
# Add your kibana plugins setup here
# Example: RUN kibana-plugin install <name|url>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment