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?

  • Docker build fails in apt-get
  • Listing the tags of a docker image on a Docker hub through the HTTP API
  • How to connect Docker Machine to a remote Docker VirtualBox
  • How to extend an existing docker image?
  • Docker compose “--no-build was passed”
  • “Error Checking TLS connection: Host is not running” from docker-machine when SSHing into Windows host
  • Multiple service starting with make inside docker-compose
  • Chef Test Kitchen - Verifications
  • getResource not work with jar running in docker
  • error: repository [dockerimage] not found: does not exist or no pull access-docker
  • install nvm in docker
  • run a meteor app on docker - doesn't open in localhost
  • 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.