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.