Passing Elasticsearch and Kibana config file to docker containers

I have found a docker image devdb/kibana which runs Elasticsearch 1.5.2 and Kibana 4.0.2. However I would like to pass into this docker container the configuration files for both Elasticsearch (i.e elasticsearch.yml) and Kibana (i.e config.js)

Can I do that with this image itself? Or for that would I have to build a separate docker container?

  • Local docker volume with write permission from www-data
  • Docker Compose Links not working with Host mode
  • {“message”:“No such image: jenkins_slave_1:latest”}
  • connecting tomcat webapp running in docker container to mysql
  • How to parameterize Dockerfile?
  • DNS failover with Docker Swarm 1.12
  • Google Container Registry access denied when pushing docker container
  • How to make docker application use port 80 (http) instead of 443 (https)
  • How to ship java based web application in AWS cloud using docker
  • how to cross docker-compose.yml file to link container
  • vagrant Multipe networking
  • Simple Docker image running Apache won't start up on Centos 7.2
  • One Solution collect form web for “Passing Elasticsearch and Kibana config file to docker containers”

    Can I do that with this image itself?

    yes, just use Docker volumes to pass in your own config files

    Let say you have the following files on your docker host:

    • /home/liv2hak/elasticsearch.yml
    • /home/liv2hak/kibana.yml

    you can then start your container with:

    docker run -d --name kibana -p 5601:5601 -p 9200:9200 \
        -v /home/liv2hak/elasticsearch.yml:/opt/elasticsearch/config/elasticsearch.yml \
        -v /home/liv2hak/kibana.yml:/opt/kibana/config/kibana.yml \
        devdb/kibana
    

    I was able to figure this out by looking at your image Dockerfile parents which are: devdb/kibana→devdb/elasticsearch→abh1nav/java7→abh1nav/baseimage→phusion/baseimage
    and also taking a peek into a devdb/kibana container: docker run --rm -it devdb/kibana find /opt -type f -name *.yml.


    Or for that would I have to build a separate docker container?

    I assume you mean build a separate docker image?. That would also work, for instance the following Dockerfile would do that:

    FROM devdb/kibana
    COPY elasticsearch.yml /opt/elasticsearch/config/elasticsearch.yml
    COPY kibana.yml /opt/kibana/config/kibana.yml
    

    Now build the image: docker build -t liv2hak/kibana .

    And run it: docker run -d --name kibana -p 5601:5601 -p 9200:9200 liv2hak/kibana

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.