Quick start install Elasticsearch and Kibana with Docker

In this tutorial, How to Quickstart install Elasticsearch and Kibana with Docker.

  • Elasticssearch: localhost:9200
  • Kibana: localhost:5601

Docker-compose start with

docker-compose -f docker-compose.yml up -d

Docker-compose Stop

$ docker-compose -f docker-compose.yml down

Be careful with command docker-compose down. If you want Stop and remove containers, networks, images, and volumes as in the picture below

install Elasticsearch and Kibana with Docker

Install Elasticsearch with Kibana with Docker-compose

For example docker-compose.yml

version: '3'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
    ports:
      - 9200:9200
    volumes:
      - ./share/elasticsearch/data:/usr/share/elasticsearch/data
      - ./share/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
    networks: [elastic]
    environment:
      - discovery.type=single-node
  kibana:
    image: docker.elastic.co/kibana/kibana-oss:6.3.2
    ports:
      - 5601:5601
    networks: [elastic]
networks:
  elastic:

Host OS ./share/elasticsearch/data and Guest OS /usr/share/elasticsearch/data are mounted for data persistence of Elasticsearch.

File configure single node “./share/elasticsearch/config/elasticsearch.yml”

cluster.name: "docker-cluster"
network.host: 0.0.0.0
discovery.zen.minimum_master_nodes: 1

Steps install Elasticsearch and Kibana with Docker as the picture below

[vagrant@localhost ~]$ tree /home/vagrant/
/home/vagrant/
├── docker-compose.yml
└── share
    └── elasticsearch
        ├── config
        │   └── elasticsearch.yml
        └── data

4 directories, 2 files
install Elasticsearch and Kibana with Docker
install Elasticsearch and Kibana with Docker

Access the client browser as the picture below

Kibana: localhost:5601

install Elasticsearch and Kibana with Docker

Elasticsearch: localhost:9200

install Elasticsearch and Kibana with Docker

Conclusion

Thought the article, How to “Quickstart install Elasticsearch and Kibana with Docker” as above. I hope will this your helpful. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology, especially Devops Skill such as Docker, vagrant, git, and so forth. I like open-sources, so I created DevopsRoles.com to share the knowledge I have acquired. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

3 thoughts on “Quick start install Elasticsearch and Kibana with Docker

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.