Docker Compose Elasticsearch And Kibana

In this article, We will show you how to run Elasticsearch and Kibana containers using Docker Compose.

Image for post

Initial Setup

The first step is to setup Elasticsearch on your system. We are using Docker to setup. Make sure you have installed docker on your system or can download it from the Docker webpage.

Let’s start

Create a new file docker-compose.yml under any directory, In our case, we are using the following project structure.

Project (Directory)
├── docker-compose.yml (File)
Image for post

docker-compose.yml

In the above file, we are creating 2 containers one for Elasticsearch and second for Kibana

To start containers, Run the following command in the terminal

docker-compose up

When you run the above command you will see the following ouput in the terminal.

Image for post

Verify Running Elasticsearch

To verify, Running container of Elasticsearch. Open the browser and type the following URL

http://localhost:9200

You will see the JSON response in the browser as shown below in the screenshot.

Image for post

Verify Running Kibana

To verify, Running container of Kibana. Open the browser and type the following URL

http://localhost:5601

You will see the Welcome screen in the browser as shown below in the screenshot.

Image for post

We are done with Elasticsearch and Kibana setup using Docker Compose

Thank you 🚀🚀🚀

We teach & develop for startups

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store