Container port not reachable from host

Hi, i am new to docker, but it looks interesting to me.

I am trying to run kibana in a docker container. Port availability inside the container works, but not from host.

I am using this script to build the container:


sudo docker run \
-d \
--cpus=$CPU_LIMIT \
--init \
--name kibana \
--hostname kibana \
-p$HOST_PORT:5601 \

docker ps shows me the following:

CONTAINER ID        IMAGE                                       COMMAND                  CREATED             STATUS              PORTS                     NAMES
fb97e3925da3       "/bin/bash /usr/loca…"   About an hour ago   Up 21 minutes>5601/tcp   kibana
e087cf628a3a   "/usr/local/bin/dock…"   About an hour ago   Up About an hour    5044/tcp, 9600/tcp        logstash_ingest_1
cf3f150d5e1d        redis                                       "docker-entrypoint.s…"   8 days ago          Up 6 days >6379/tcp    redis

Inside the container it looks good, the application’s port is reachable via curl on localhost:5601

bash-4.2$ curl localhost:5601
<script>var hashRoute = '/kibana-TSI/app/kibana';
var defaultRoute = '/kibana-TSI/app/kibana';

var hash = window.location.hash;
if (hash.length) {
  window.location = hashRoute + hash;
} else {
  window.location = defaultRoute;

When I want to connect from the host this happens:

[root@server ~]$ curl localhost:15601
curl: (56) Recv failure: Connection reset by peer
[root@server ~]$ curl
curl: (7) Failed connect to; Connection refused

Any help is appreciated.
Thanks in advance, Andreas

@0asp0 did you find the reason for this problem?