Skip to content

Instantly share code, notes, and snippets.

@shiveshabhishek
Last active September 30, 2018 21:26
Show Gist options
  • Save shiveshabhishek/db99ff8c32189b4e8bf9d14cf9f0a994 to your computer and use it in GitHub Desktop.
Save shiveshabhishek/db99ff8c32189b4e8bf9d14cf9f0a994 to your computer and use it in GitHub Desktop.
Running Kibana with Own-Home in Docker (Ubuntu)

Steps:

  • First create a Docker Image with the help Dockerfile below which installs the kibana-own-home plugin in Kibana. (Note: This image of kibana is free [kibana-oss])
  • Then configure kibana.yml to use the configurations of the own-home plugin.
  • You must be having your elasticsearch instance running at port 9200.
    (docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.4.0)

File: Dockerfile

FROM docker.elastic.co/kibana/kibana-oss:6.4.0
RUN bin/kibana-plugin install https://github.com/wtakase/kibana-own-home/releases/download/v6.4.0/own_home-6.4.0.zip
COPY kibana.yml ./config/kibana.yml

File: kibana.yml

server.name: kibana
server.host: "0"

own_home.proxy_user_header: x-forwarded-user
own_home.session.secretkey: 'the-password-must-be-at-least-32-characters-long'
own_home.session.isSecure: false
own_home.elasticsearch.url: http://172.17.0.1:9200
own_home.local.groups: [sandbox]
own_home.explicit_kibana_index_url.enabled: true
elasticsearch.url: http://127.0.0.1:19200
elasticsearch.requestHeadersWhitelist: [authorization, x-forwarded-user]

Build and Run

  • Build the image (Copy and paste the image into your terminal)(run this code where you've stored the above files):
    docker build -t yourimagename/kibana:versionX .

  • Then finally, run the image with below code:
    docker run -d -p 5601:5601 yourimagename/kibana:versionX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment