Set server.basePath and server.host in docker file

Hello

I have this (working) docker-compose.yml file (before server. tries):

version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- "discovery.type=single-node"
ports:
- 9200:9200

kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:7.6.2
ports:
- 5601:5601

With locally kibana I could edit kibana.yml and set server.basePath and server.host (and then do redirect to kibana address using java tomcat servelt ) but I not success to do it via the docker image.
I tried to add them under environment:

environment:
- "server.basePath: /kibana"
- "server.host: 0.0.0.0"

The docker us running but I still can access Kibana via the regular url (http://localhost:5601)

I'll be glad to know what the correct way to initialize those parameters via docker file.

Thank you very much!

Hey @AsfK,

Kibana requires a different config format for docker, in order to be compatible with orchestration systems: https://www.elastic.co/guide/en/kibana/current/docker.html#environment-variable-config

Try specifying this format instead:

environment:
- "SERVER_BASEPATH=/kibana"
- "SERVER_HOST=0.0.0.0"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.