1

So I've spent the last 6 hrs doing this and successfully got it to work with 2 separate docker containers (I just do a docker pull kibana:7.3.2 and docker pull elasticsearch:7.3.2). The tag seems to be important for some reason as latest gives me an error ... anyway I follow this up with 2 separate docker run commands mapping ports 9200 and 5601 to localhost:9200 and localhost:5601 respectively.

It seems even though I have an -e ELASTIC_SEARCH_URL = "127.0.0.1:9200" in my docker run for kibana, it didn't work properly and I had to do log into my running kibana container and configure the kibana.yml file to point to 127.0.0.1:9200 (elastic search) manually

docker run --name kibana -p 5601:5601 --link elasticsearch_container:0bf156df9385 -e "ELASTICSEARCH_URL=http://127.0.0.1:9200" kibana

Long story short, this was too time consuming to do each time so I eventually found docker-compose which I realize I should be using to begin with. so I have the following docker-compose.yml

version: '2'
services:
     elasticsearch:
       image: docker.elastic.co/elasticsearch/elasticsearch:7.3.2
       container_name: elasticsearch
       networks:
           docker-elk:

     kibana:
       image: docker.elastic.co/kibana/kibana:7.3.2
       container_name: kibana
       environment:
          - "ELASTICSEARCH_URL=http://elasticsearch:9200"
       networks:
          - docker-elk
       depends_on:
          - elasticsearch

networks:
  docker-elk:
    driver: bridge

Now when I run docker-compose up -d in same directory as this file, it just gives me nothing ...doesn't start a container (I tried docker ps and docker-compose build with the --versbose flag ... still nothing).

I'm not sure what I'm doing wrong or where to go from here. I'm on Ubuntu 4.15 and am very new to this docker stuff.

1
  • any help on this would be much appreciated i feel like im so close to getting this working. i tried uninstalling and reinstalling docker-compose several times as well (rm from /usr/bin/ and wgetting the actual binary) but did not work :( – MrL Sep 16 '19 at 5:28
0

Try using docker-compose up (no -d). Then you can see the what causes the problem. If the problem is that you get the following error -which I had- try adding a configuration to your elasticsearch service:

the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

If you are in a testing environment and do not need a elasticsearch cluster use this:

environment:
      - discovery.type=single-node

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.