Skip to content

Instantly share code, notes, and snippets.

@hideojoho
Last active December 1, 2016 11:08
Show Gist options
  • Save hideojoho/7eb5e2fdb08a31ebaaa3c98eca0c97e0 to your computer and use it in GitHub Desktop.
Save hideojoho/7eb5e2fdb08a31ebaaa3c98eca0c97e0 to your computer and use it in GitHub Desktop.
How to set up Elasticsearch and Kibana using Docker

Requirements

  • At least 6-8GB of RAM (of those 4GB will be used for a virtual machine)
  • About 1GB of diskspace
  • 0.5 hours of time (depends on your network speed)

Environments

  • MacOSX 10.11.6
  • Docker for Mac

Download & Install

Configure Docker.app

  • Start Docker.app and wait til it's ready
  • Go to the menu icon and click preferences
  • Increase the memory size to 4GB

Prepare for a Docker container

$ mkdir elastic
$ cd elastic
$ vi docker-compose.yml
kibana:
  image: kibana
  links:
    - elasticsearch:elasticsearch
  ports:
    - 5601:5601

elasticsearch:
  image: elasticsearch
  ports:
    - 9200:9200
    - 9300:9300

Install docker images and make containers

$ docker-compose up -d

Check the instances

$ docker ps

Kibana status check

Stop the containers

$ docker-compose stop

Remove containers

All data will be gone

$ docker-compose rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment