Kibanadocker运行

我用ubuntu的映像创build一个容器。

没关系,我可以用得很好。

所以,我在这个Ubuntu的docker中安装了kibana服务。

当我在pathbin上执行kibana时,请运行正确并且正在侦听:localhost:5601

这意味着kibanaconfiguration正确,但是当我在我的浏览器中访问docker时,不起作用。

我已经在正确的path上在kibana.yml文件上configuration了networking。

我可以看到docker(cmd)上运行的服务。

我最初的kibana.yml文件:

# Kibana is served by a back end server. This setting specifies the port to use. #server.port: 5601 # Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. # The default is 'localhost', which usually means remote machines will not be able to connect. # To allow connections from remote users, set this parameter to a non-loopback address. # server.host: "0.0.0.0" 

每个容器都有自己的本地主机,不能从外部访问。

你的问题包含答案:

 # Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. # The default is 'localhost', which usually means remote machines will not be able to connect. # To allow connections from remote users, set this parameter to a non-loopback address. # server.host: "0.0.0.0" 

取消注释该块的最后一行以在容器的“外部”接口上运行服务器。 然后它会从外面访问。

这将允许其他容器到达它。 如果要绑定端口,以便非容器可以访问它,请使用-p标志运行容器以发布端口。

 docker run -p 5601:5601 [.....]