Ubuntu: Install Elasticsearch as Docker Container and manage it nicely in GUI

Submitted by Peter Majmesku on Fri, 12/09/2016 - 14:16

Install Docker

Firstly install Docker via this article: https://docs.docker.com/engine/installation/linux/ubuntulinux/. Mind to setup the user and group permissions according to the article. So that you are able to start Docker as non-root user.

Check your user's group setting

Make sure that a group with the name "docker" exists and your user is a member of that group. To add a user to an existing group, execute the following command:

sudo usermod -a -G groupName userName

After your user (mine f.e. is "peter") is being successfully added into the "docker" group, logout and login to ensure that you are acting from the docker user group.

Install Kitematic

Dowload the Kitematic GUI for Docker Debian package via https://github.com/docker/kitematic/releases. This program will empower you, to manage your Docker containers easily via a graphical user interface. Mind that this application is currently beta. Then install it by

sudo dpkg -i dist/Kitematic_0.12.9_amd64.deb

Install Elasticsearch as Docker Container by Kitematic

Follow the following steps in Kitematic:

  1. Hit the "New"-Button
  2. Search for "elasticsearch" to see the official Elasticsearch Docker Container in the search result list
  3. Choose the version you want via the tag (version 1.7.2 is the version which works for me)
  4. Hit the button which is labeled with "Create". Kitematic will now install the Elasticsearch Docker container for you.

GUI for Elasticsearch: Jettro

To be able to execute easily queries within Elasticsearch, check status etc., you can install Jettro (https://github.com/jettro/elasticsearch-gui). Just execute the following command inside your Elasticsearch Docker container to install the Elasticsearch plugin:

bin/plugin install jettro/elasticsearch-gui 

Start the Docker Container automatically on system startup as a Daemon

An official tutorial about this can be found here: https://docs.docker.com/engine/admin/host_integration/. In particular, you can follow the steps below.

Create a file at 


with the following content:

Description=Elasticsearch container

ExecStart=/usr/bin/docker start -a elasticsearch
ExecStop=/usr/bin/docker stop -t 2 elasticsearch


Now reload the daemon:

sudo systemctl daemon-reload

Start the Elasticsearch Docker container as a service:

sudo systemctl start docker-elasticsearch.service

Enable the service at system startup:

sudo systemctl enable docker-elasticsearch.service

Voilà! Happy search index querying. (: