I build a docker image from dockerfile with ubuntu as the base. I manually install elasticsearch kibana airflow in it. The ip of my container is 172.17.0.2 . I am able to access the Airflow’s Web UI from the host machine at 172.17.0.2:8080 . However cannot access Kibana or elasticsearch at 172.17.0.2:5601 and 172.17.0.2:9200 respectively.
The following is the excerpt from my dockerfile for installing elasticsearch:
RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
RUN echo “deb https://artifacts.elastic.co/packages/6.x/apt stable main” | tee -a /etc/apt/sources.list.d/elastic-6.x.list
RUN apt-get update
RUN apt-get install elasticsearch